Backup built-in SecureCircle Database using mysqldump
  • 17 Oct 2020
  • 1 Minute To Read
  • Print
  • Share
  • Dark
    Light

Backup built-in SecureCircle Database using mysqldump

  • Print
  • Share
  • Dark
    Light

The mysqldump command can be used to create a consistent snapshot of the built-in SecureCircle DB. The following commands can be used to execute the mysqldump command within the Docker Compose environment.

OUTPUT_DIR=/path/where/mysqldump/should/be/output/
mkdir -p "${OUTPUT_DIR}" && \
cd /path/to/directory/containing/docker-compose.yml/ && \
source .env && \
docker-compose exec securecircle-db mysqldump -u"${DB_USERNAME}" -p"${DB_PASSWORD}" --databases System Tracker Runtime Share Spare > "${OUTPUT_DIR}"/securecircle-db-dump-`date +%s`.sql

The above commands may be added to a script and executed as a cron job to perform routine dumps of the SecureCircle DB.

Was This Article Helpful?