Skip to content
Snippets Groups Projects
Commit 930c73ff authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Removes older backup

parent 0fae92c9
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,14 @@ Type=oneshot
TimeoutStartSec=0
WorkingDirectory=/data/domains/%i/
EnvironmentFile=/etc/environment
ExecStartPre=/bin/bash -euxc ' \
/bin/docker run \
--rm \
--name clean-%i \
-v /root:/root \
indiepaas/duplicity \
remove-older-than 4W --force \
sftp://${BACKUP_DESTINATION}/%i'
ExecStartPre=/bin/bash -euxc '/data/domains/%i/BACKUP'
ExecStart=/bin/bash -euxc ' \
/bin/docker run \
......
......@@ -8,6 +8,14 @@ EnvironmentFile=/etc/environment
ExecStartPre=/usr/bin/docker run --rm -v /opt/bin:/opt/bin ibuildthecloud/systemd-docker
ExecStartPre=-/usr/bin/docker kill mysqldump-%i
ExecStartPre=-/usr/bin/docker rm mysqldump-%i
ExecStartPre=/bin/bash -euxc ' \
/bin/docker run \
--rm \
--name clean-%i \
-v /root:/root \
indiepaas/duplicity \
remove-older-than 4W --force \
sftp://${BACKUP_DESTINATION}/%i'
ExecStartPre=/bin/bash -euxc '\
if [ -d /data/domains/%i/mysql ]; then \
echo "Backing up mysql databases for %i"; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment