An EMEN2 environment contains a number of things:
- _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:
- log/ (EMEN2 application logs)
- ssl/ (SSL certificates)
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 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.
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.