-
Notifications
You must be signed in to change notification settings - Fork 0
ArtdaqDatabaseExportImport
This page provides instructions for replicating artdaq configuration data between instances of artdaq_database. This procedure can also be used for making periodic database backups and distributing initial artdaq configuration data.
1. Identify and login into the machine that hosts the artdaq database,
which needs to be backed up.
2. Configure your artdaq environment. This step is specific to your
project. Confirm that the artdaq product was setup and take a note of
the artdaq product qualifier being used.
ups active |grep artdaq
-
Setup artdaq_database if it was not in the active product list.
setup artdaq_database v1_04_20 -q "replace with your artdaq product qualifier"
-
Export ARTDAQ_DATABASE_URI so it points to the database instance that you are backing up.
Examples: export ARTDAQ_DATABASE_URI="filesystemdb:///home/daquser/databases/filesystemdb/my_current_db" export ARTDAQ_DATABASE_URI="mongodb://127.0.0.1:27017/my_current_db"
-
Create a directory for a database backup.
export DBARCHIVES="/tmp/mydatabasearchives"; mkdir -p $DBARCHIVES; cd $DBARCHIVES
-
Export artdaq_database into the current directory.
conftool.py exportDatabase
-
Copy the contents of $DBARCHIVES directory to the machine where the backup is to be restored, and repeat steps 2,3,&4. The ARTDAQ_DATABASE_URI variable should point to the new database instance.
-
Import database from the newly created backup. Note: This operation overwrites documents with the same document id.
conftool.py importDatabase