2022-05-22 13:42:34 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
rsync -avcHS --exclude 'var/backups' --exclude 'opt' --exclude 'sys' --exclude 'proc' --exclude 'dev' --delete / /var/backups/mother 1>> /var/log/backup.log
|
|
|
|
rsync -avcHS --exclude 'var/backups' --exclude 'opt' --exclude 'sys' --exclude 'proc' --exclude 'dev' --delete aunt.onlink:/ /var/backups/aunt 1>> /var/log/backup.log
|
|
|
|
|
|
|
|
echo "BACKUP SESSION $(date)" >> /var/log/backup.log
|
|
|
|
virt-backup backup 1>> /var/log/backup.log
|
|
|
|
virt-backup clean 1>> /var/log/backup.log
|
|
|
|
|
2022-08-02 17:11:38 +02:00
|
|
|
/opt/sharedfs/outils/blockcommit_all.sh
|
|
|
|
|
2022-05-22 13:42:34 +02:00
|
|
|
#find /var/backups -type f -exec sudo fallocate -v -d {} \;
|
|
|
|
|
2022-08-02 17:11:38 +02:00
|
|
|
# Wait for aunt to finish
|
|
|
|
processes=$(ssh aunt 'ps aux' | grep virt-backup)
|
|
|
|
|
|
|
|
while [ ! -z "$processes" ];
|
|
|
|
do
|
|
|
|
sleep 60
|
|
|
|
done
|
|
|
|
|
|
|
|
find /var/backups -type f -exec sudo fallocate -v -d {} \;
|