SystemComponent "dataspectsSystem Duplicity backup"

From FindAndLearn::Cookbook
C181023143327
Jump to: navigation, search


[email protected]:~$ vi backup.sh

docker exec \
    dataspects_db_1 \
      mysqldump \
        --password=<password> \
        --user=<username> \
        --host=localhost \
        --complete-insert \
        --add-drop-database \
        --add-drop-table \
        --compact \
        --create-options \
        --no-create-db \
        --result-file=/datadump/<foldername>/dump.sql \
        <databasename>

docker run --rm --user 0 \
  -v /root/.cache:/home/duplicity/.cache/duplicity \
  -e DEST="s3+http://<path>" \
  -e AWS_ACCESS_KEY_ID=<key> \
  -e AWS_SECRET_ACCESS_KEY=<key> \
  -e ENCRYPTION=no \
  -v /var/lib/docker/volumes/<volume>:/data \
  dataspects/docker-duplicity:1.0 \
  --backup