Size: 1338
Comment:
|
Size: 2279
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
Example: {{{ # python ./cmdlineutils/backup.py --archive Loading config files: ['/home/emen2/emen2/config/config.base.yml'] ... startup ... Opening Database Environment: /home/emen2/db/ Log Archive: Checkpoint Log Archive: /home/emen2/db/log/log.0000000303 -> /home/emen2/db_archive/log.0000000303 Log Archive: /home/emen2/db/log/log.0000000304 -> /home/emen2/db_archive/log.0000000304 Log Archive: /home/emen2/db/log/log.0000000305 -> /home/emen2/db_archive/log.0000000305 Log Archive: /home/emen2/db/log/log.0000000306 -> /home/emen2/db_archive/log.0000000306 Log Archive: /home/emen2/db/log/log.0000000307 -> /home/emen2/db_archive/log.0000000307 Log Archive: /home/emen2/db/log/log.0000000308 -> /home/emen2/db_archive/log.0000000308 Log Archive: /home/emen2/db/log/log.0000000309 -> /home/emen2/db_archive/log.0000000309 Log Archive: /home/emen2/db/log/log.0000000310 -> /home/emen2/db_archive/log.0000000310 }}} |
EMEN2 Maintenance and Backups
EMEN2 supports three types of backups: Log Archive, Cold Backup, and Hot Backup.
Log Archive
EMEN2 uses Berkeley DB as the underlying database technology. To provide guarantees about transaction atomicity and durability, Berkeley DB writes changes to a log file on stable storage before a transaction is marked as committed. Database files are not updated until this step is complete. In the event of a crash or hardware failure, the database files can be checked against the log files to correct any errors or missing data.
The log files are stored in $DB_HOME/log as log.XX, where XX is a sequential integer starting from 1. With default settings, the files are 8 MB each. As one log file is finished, the next log file in the sequence is created and used as the active log file.
Log files that are not being used by any open transaction may be archived after a "Checkpoint" is made. This frees up disk space in the DB_HOME environment, and lets the administrator move the logs to long term archival storage.
The EMEN2 backup utility will archive finished logs when run with the "--archive" flag. Finished log files will be moved to the location specified by the "ARCHIVE" configuration setting.
backup.py --archive
Example:
# python ./cmdlineutils/backup.py --archive Loading config files: ['/home/emen2/emen2/config/config.base.yml'] ... startup ... Opening Database Environment: /home/emen2/db/ Log Archive: Checkpoint Log Archive: /home/emen2/db/log/log.0000000303 -> /home/emen2/db_archive/log.0000000303 Log Archive: /home/emen2/db/log/log.0000000304 -> /home/emen2/db_archive/log.0000000304 Log Archive: /home/emen2/db/log/log.0000000305 -> /home/emen2/db_archive/log.0000000305 Log Archive: /home/emen2/db/log/log.0000000306 -> /home/emen2/db_archive/log.0000000306 Log Archive: /home/emen2/db/log/log.0000000307 -> /home/emen2/db_archive/log.0000000307 Log Archive: /home/emen2/db/log/log.0000000308 -> /home/emen2/db_archive/log.0000000308 Log Archive: /home/emen2/db/log/log.0000000309 -> /home/emen2/db_archive/log.0000000309 Log Archive: /home/emen2/db/log/log.0000000310 -> /home/emen2/db_archive/log.0000000310
Cold Backup