История изменений
Исправление strangeman, (текущая версия) :
cat /etc/cron.d/backup_niceserver.sh
#!/bin/bash
KEY=/root/.ssh/niceserver
BACKUP_PATH=/mnt/sdb1/backup/niceserver
REMOTE_HOST='root@192.168.0.252:/mnt/sdb1/backups/dump/*'
# make backup directory
mkdir -p $BACKUP_PATH
# copy backup from remote server
scp -Br -i $KEY $REMOTE_HOST $BACKUP_PATH
# remove backup's older than 15 days
find $BACKUP_PATH -ctime +14 -type f -exec rm {} \;
Исходная версия strangeman, :
cat /etc/cron.d/backup_niceserver.sh
#!/bin/bash
KEY=/root/.ssh/niceserver
BACKUP_PATH=/mnt/sdb1/backup/niceserver
REMOTE_HOST='root@192.168.0.252:/mnt/sdb1/backups/dump/*'
# make backup directory
mkdir -p $BACKUP_PATH
# copy backup from remote server
scp -Br -i $KEY $REMOTE_HOST $BACKUP_PATH
# remove backup's older than 15 days
find $BACKUP_PATH -ctime +7 -type f -exec rm {} \;