Size: 1597
Comment:
|
← Revision 14 as of 2013-04-18 06:47:18 ⇥
Size: 1868
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
# EMEN2 Backups |
= EMEN2 Backups = |
Line 7: | Line 6: |
* __db.* (BDB backing files) * home/ (BDB registration) * log/ (BDB log files) * data/ (EMEN2 databases) |
* _db.* (environment backing files) * data/ (databases) * journal/ (transaction journal) |
Line 13: | Line 11: |
* emen2data/ (file storage) * tiles/ (thumbnails and other derived data) |
* binary/ (file storage) * preview/ (thumbnails and other derived data) |
Line 20: | Line 18: |
* applog/ (EMEN2 application logs) * ssl/ (encryption keys) |
* log/ (EMEN2 application logs) * ssl/ (SSL certificates) |
Line 23: | Line 21: |
# Cold Backups | = Cold Backups = |
Line 27: | Line 25: |
If you have specified paths outside EMEN2DBHOME, e.g. for binary attachment storage, you will also need to archive these directories. | = Hot Backups = |
Line 29: | Line 27: |
# 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: |
If the database 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 checkpoint the environment and copy updated BerkeleyDB transaction log files using: |
Line 34: | Line 30: |
emen2control.py --log_archive | emen2ctl archive -h <EMEN2DBHOME> |
Line 37: | Line 33: |
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" | This command will copy the journal/log.* files to the configuration-specified directory, by default, EMEN2DBHOME/journal_archive. These can be copied to the journal directory of the cold backup, and replayed using the BerkeleyDB recover command, "db_recover -c -h <backup directory>". Please email me if you have any questions or concerns about this operation. |
Line 39: | Line 35: |
# Non-BerkeleyDB Files | = Non-BerkeleyDB Files = |
Line 41: | Line 37: |
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. | Files that are not part of the BerkeleyDB environment (binary, preview, config, etc.) can be copied at any time using normal backup procedures; rsync is probably the most appropriate tool. If you have changed your configuration to use directories outside of EMEN2DBHOME (most commonly, to place binary storage on different disk) make sure you back these up as well! Again, rsync is fine. |
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.
Hot Backups
If the database 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 checkpoint the environment and copy updated BerkeleyDB transaction log files using:
emen2ctl archive -h <EMEN2DBHOME>
This command will copy the journal/log.* files to the configuration-specified directory, by default, EMEN2DBHOME/journal_archive. These can be copied to the journal directory of the cold backup, and replayed using the BerkeleyDB recover command, "db_recover -c -h <backup directory>". Please email me if you have any questions or concerns about this operation.
Non-BerkeleyDB Files
Files that are not part of the BerkeleyDB environment (binary, preview, config, etc.) can be copied at any time using normal backup procedures; rsync is probably the most appropriate tool.
If you have changed your configuration to use directories outside of EMEN2DBHOME (most commonly, to place binary storage on different disk) make sure you back these up as well! Again, rsync is fine.