wip
This commit is contained in:
parent
aa1d78b9e1
commit
2b1bef9110
2 changed files with 22 additions and 0 deletions
|
@ -8,6 +8,8 @@ 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=-/usr/bin/docker rm clean-%i
|
||||
ExecStartPre=-/usr/bin/docker rm backup-%i
|
||||
ExecStartPre=/bin/bash -euxc ' \
|
||||
/bin/docker run \
|
||||
--rm \
|
||||
|
|
20
utils/spread_backups.sh
Executable file
20
utils/spread_backups.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash -eux
|
||||
|
||||
for unit in `systemctl list-units --all backup@*service | grep "Back up data" | cut -d" " -f2 | grep backup | sort -R`
|
||||
do
|
||||
systemctl stop $unit
|
||||
systemctl restart $unit
|
||||
done
|
||||
|
||||
for unit in `systemctl list-units --all backup@*service | grep "Back up data" | cut -d" " -f3 | grep backup | sort -R`
|
||||
do
|
||||
systemctl stop $unit
|
||||
systemctl restart $unit
|
||||
done
|
||||
|
||||
for unit in `systemctl list-units --all backup@*service | grep "Back up data" | cut -d" " -f1 | grep backup | sort -R`
|
||||
do
|
||||
systemctl stop $unit
|
||||
systemctl restart $unit
|
||||
done
|
||||
|
Loading…
Reference in a new issue