服务器文件备份阿里云盘

Debian / Ubuntu

1
sudo curl -fsSL http://file.tickstep.com/apt/pgp  gpg --dearmor  sudo tee /etc/apt/trusted.gpg.d/tickstep-packages-archive-keyring.gpg > /dev/null && echo "deb [signed-by=/etc/apt/trusted.gpg.d/tickstep-packages-archive-keyring.gpg arch=amd64,arm64] http://file.tickstep.com/apt aliyunpan main"  sudo tee /etc/apt/sources.list.d/tickstep-aliyunpan.list > /dev/null && sudo apt-get update && sudo apt-get install -y aliyunpan

Centos

1
sudo curl -fsSL http://file.tickstep.com/rpm/aliyunpan/aliyunpan.repo  sudo tee /etc/yum.repos.d/tickstep-aliyunpan.repo > /dev/null && sudo yum install aliyunpan -y

 

登录云盘

1
aliyunpan login

设置定时任务(宝塔设置定时任务)

将 /path/to/backup/file 目录上传到阿里云盘 ,该目录可自行修改

1
aliyunpan upload /path/to/backup/file /backup/$(date +\%Y\%m\%d)