Koozali.org: home of the SME Server

Support extensions to backup restore_list

pkn

Support extensions to backup restore_list
« on: November 02, 2005, 04:07:31 PM »
Support for server modification and third-party development could be improved if an administrator or application developer could define additional files and directories to be included in an SME Server backup (via db tuning).   Currently that list is defined in the system file /usr/lib/perl5/site_perl/esmith/Backup.pm.

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: Support extensions to backup restore_list
« Reply #1 on: November 03, 2005, 02:04:35 AM »
Quote from: "pkn"
Support for server modification and third-party development could be improved if an administrator or application developer could define additional files and directories to be included in an SME Server backup (via db tuning).   Currently that list is defined in the system file /usr/lib/perl5/site_perl/esmith/Backup.pm.


Why not just copy the files into /home/e-smith/<something> in the 'pre-backup' event, and do whatever you need to do in the 'post-upgrade' event, which is called after a restore?

Or better, store the relevant files under the existing trees.

There is a very real chicken and egg problem here. If files have to be restored from "other" places, how do you know which other places they are until you've restored the dbs?
............

pkn

Re: Support extensions to backup restore_list
« Reply #2 on: November 09, 2005, 08:19:55 PM »
Quote from: "gordonr"
Why not just copy the files into /home/e-smith/<something> in the 'pre-backup' event, and do whatever you need to do in the 'post-upgrade' event, which is called after a restore?


Writing event actions to copy/backup/delete is more work than would be the case if we could simply specify additional files/directories for inclusion in an SMe Server backup.  And it may require considerably more disk space.

Quote from: "gordonr"
Or better, store the relevant files under the existing trees.


In some cases it will be hard convincing application designers to place stuff in /home/e-smith/ rather than something more generic, like /opt/app/.  

Quote from: "gordonr"
There is a very real chicken and egg problem here. If files have to be restored from "other" places, how do you know which other places they are until you've restored the dbs?


It doesn't appear to be an issue in desktop backup because we're simply restoring the contents of the backup, we're not referring to a defined list of directories and files.   I can see this being a problem for tape.

Can the restore process not refer to some config db within the restore itself for that user-extensible list?

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: Support extensions to backup restore_list
« Reply #3 on: November 11, 2005, 07:19:04 AM »
Quote from: "pkn"

It doesn't appear to be an issue in desktop backup because we're simply restoring the contents of the backup, we're not referring to a defined list of directories and files.   I can see this being a problem for tape.

Can the restore process not refer to some config db within the restore itself for that user-extensible list?


No - that's the chicken and egg issue. We restore the config dbs from tape/desktop backup, so we may lose the config values you need.

And if we did read them out of the backup, we'd need to read the backup twice, which we can't do as we read it as a stream. To read it twice, we'd need to copy it to the server before restoring, which would further limit the size of the backup file.

There is also a security issue of an extensible restore list. We intentionally do not restore any directories which might contain executable code.

I think one of the options I outlined will provide what you need. Have a look at the MySQL db dump/restore as an example. We dump a text copy of the db so that we can restore it later.
............