[modify] copy restore.sh to syncthing everyday, and do a compression on 1st of every month
This commit is contained in:
parent
15362bfeea
commit
2b4d9f1bf5
@ -17,6 +17,7 @@ cp -rf /root/.vim_runtime/my_configs.vim /opt/configs/conf/
|
||||
cp -rf /root/.ssh/config /opt/configs/conf/
|
||||
cp -rf /etc/samba/smb.conf /opt/configs/conf/
|
||||
cp -rf /root/.acme.sh/*ecc /opt/configs/acme/
|
||||
cp -rf /opt/scripts/update/restore.sh /opt/apps/syncthing/data/common/F-Backup/Linux/
|
||||
|
||||
cd /opt && t=`date +%Y%m%dT%H%M%S`
|
||||
rsync --delete-after -avz apps configs logs scripts websites wd/72-Backups/VPS/ > /opt/logs/rsync/rsync_${t}.log
|
||||
@ -33,7 +34,11 @@ if [[ $count -gt 10 ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# tar -I pixz -cf $backup_dir/vps-${t}.tar.xz -C /opt configs data logs scripts source-code websites > /dev/null 2>&1
|
||||
# on 1st of every month, do a compress
|
||||
if [[ `date +%d` == '01' ]]; then
|
||||
t=`date +%Y%m%d%H%M%S`
|
||||
tar -I pixz -cf /opt/wd/72-Backups/vps-${t}.tar.gz /opt/wd/72-Backups/VPS > /dev/null 2>&1
|
||||
fi
|
||||
set +x
|
||||
echo End Time: `date`
|
||||
echo "========================================================================="
|
||||
|
Loading…
x
Reference in New Issue
Block a user