Pārlūkot izejas kodu

Add --delete to rsync (push_backup)

master
toskou pirms 2 mēnešiem
vecāks
revīzija
263e15beba
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      backup/push_backup

+ 1
- 1
backup/push_backup Parādīt failu

@@ -12,7 +12,7 @@ sleep 180

# Then
echo "Starting to push backup using ${BACKUP_TARGET}:${BACKUP_TARGET_ROOT}"
rsync -azp -e "ssh -p ${BACKUP_PORT}" /backup /data ${TRANSFERT_USER}@${BACKUP_TARGET}:${BACKUP_TARGET_ROOT}
rsync -azp --delete -e "ssh -p ${BACKUP_PORT}" /backup /data ${TRANSFERT_USER}@${BACKUP_TARGET}:${BACKUP_TARGET_ROOT}

# Stop
ssh -p ${BACKUP_PORT} ${TRANSFERT_USER}@${BACKUP_TARGET} 'sudo shutdown -h'

Notiek ielāde…
Atcelt
Saglabāt