定时将文件备份到Google Drive, 适用于Centos
wget -O /usr/bin/gdrive "https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download"
chmod +x /usr/bin/gdrive
gdrive github: https://github.com/gdrive-org/gdrive
gdrive about
gdrive程序会自动将你的token保存在用户目录下的.gdrive目录中,所以如果不需要了记得把这个文件删掉。
wget https://raw.githubusercontent.com/rfw/shell-script/master/gdriveBackup/gdriveBackup.sh
chmod +x gdriveBackup.sh
crontab -e
然后输入
0 2 * * * /xxxx/.sh
xxxx替换为脚本目录。 每日2点备份。
service crond restart //centos 6
systemctl restart crond //centos 7