cla db-dump - Database backup utility
cla db-dump creates a backup of the Clarive MongoDB database.
This command exports the database contents to a backup file that can be used for disaster recovery, migration, or archival purposes.
Usage¶
cla db-dump -c MYCONFIG [options]
Options¶
-c, --config MYCONFIG- Specify the configuration file to use.-o, --output <file>- Output file path for the database dump (default:clarive-dump-[timestamp].gz).--compress- Compress the dump file using gzip compression.--collection <name>- Dump only a specific collection.--query <json>- Dump only documents matching the specified query.
Examples¶
Dump the entire database:
cla db-dump -c myconfig -o backup.gz --compress
Dump a specific collection:
cla db-dump -c myconfig --collection master_doc -o master_doc_backup.gz
Notes¶
- Ensure sufficient disk space is available before running the dump.
- The database remains accessible during the dump operation.
- For large databases, consider using the
--compressoption to reduce file size. - Backup files should be stored securely and tested regularly for restore procedures.