[modify] rewrite restore.sh, and do a little change for backups.sh

This commit is contained in:
2023-06-30 00:32:10 +08:00
parent cccf9fb6d0
commit 2c2aac3058
3 changed files with 331 additions and 332 deletions

View File

@ -13,12 +13,13 @@ cp -rf /etc/pip.conf /opt/configs/conf/
cp -rf /etc/apt/sources.list /opt/configs/conf/
cp -rf /etc/ssh/sshd_config /opt/configs/conf/
cp -rf /root/.bashrc /opt/configs/conf/bashrc
cp -rf /root/.vim_runtime/my_configs.vim /opt/configs/conf/
cp -rf /root/.ssh/config /opt/configs/conf/
cp -rf /root/.ssh/authorized_keys /opt/configs/conf/
cp -rf /etc/samba/smb.conf /opt/configs/conf/
cp -rf /root/.acme.sh/*ecc /opt/configs/acme/
cd /opt && t=`date +%Y%m%dT%H%M%S`
rsync -av --delete apps configs logs scripts websites wd/72-Backups/VPS/ > /opt/logs/rsync/rsync_${t}.log
rsync --delete-after -avz apps configs logs scripts websites wd/72-Backups/VPS/ > /opt/logs/rsync/rsync_${t}.log
cd /opt/logs/rsync/
let count=`ls | wc -l`
if [[ $count -gt 10 ]]; then