Differences between revisions 9 and 10
Revision 9 as of 2013-04-18 06:39:01
Size: 1583
Editor: IanRees
Comment:
Revision 10 as of 2013-04-18 06:39:10
Size: 1584
Editor: IanRees
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * __db.* (environment backing files)  * \__db.* (environment backing files)

EMEN2 Backups

An EMEN2 environment contains a number of things:

BerkeleyDB files:

  • \db.* (environment backing files)

  • data/ (databases)
  • journal/ (transaction journal)

EMEN2-managed file attachments:

  • binary/ (file storage)
  • preview/ (thumbnails and other derived data)
  • tmp/ (temporary files)

Configuration and application logs:

  • DB_CONFIG
  • config.json
  • log/ (EMEN2 application logs)
  • ssl/ (SSL certificates)

Cold Backups

The most "foolproof" way to backup EMEN2 is to stop all emen2 processes, and archive the entire EMEN2DBHOME directory. At this point, everything can be backed up as normal files without any special consideration.

If you have specified paths outside EMEN2DBHOME, e.g. for binary attachment storage, you will also need to archive these directories.

Hot Backups

If the EMEN2 environment is currently open, the BerkeleyDB files cannot simply be copied, because they are likely to change during the operation. The mechanism I recommend for creating incremental backups is to first create a cold backup, then copy updated BerkeleyDB log files using:

emen2control.py --log_archive

This command will copy the EMEN2DBHOME/log/log.* files to the configuration-specified directory, and you can use these to bring a cold-backup up to date using "db_restore -c"

Non-BerkeleyDB Files

Files that are not part of the BerkeleyDB environment (emen2data, tiles, config, etc.) can be copied at any time using normal backup procedures; "rsync" is probably the most appropriate tool.

EMEN2/Backups (last edited 2013-04-18 06:47:18 by IanRees)