Since the cloud drive I use most is OneDrive, and Mix-Space only supports backups to COS, I had to find another approach.
Mix-Space saves backups to /data/mx-space/backup every day, so I just need to schedule a daily backup of that folder.
Here's an example of using RClone with OneDrive to back up Mix-Space:
Install and configure
Install on Linux/macOS/BSD:
BASH
sudo -v ; curl https://rclone.org/install.sh | sudo bash
Create and configure OneDrive:
BASH
rclone config
Schedule it to run at noon every day
BASH
mkdir /root/sh
vi /root/sh/mix-space-bak.sh
Fill it with the following:
BASH
#!/usr/bin/bash
/usr/bin/rclone sync /root/mix-space/core/data/mx-space/backup Onedrive-shiro:Shiroi_bak
# /root/mix-space/core/data/mx-space/backup 为本地文件夹,Onedrive-shiro:Shiroi_bak 为网盘中的路径。
BASH
chmod +x /root/sh/mix-space-bak.sh
crontab -e
BASH
#加上一行:
0 12 * * * /root/sh/mix-space-bak.sh
---
Warning
Make sure the shell script has a shebang line, and adjust that line to match your shell — this article uses zsh. After editing the shell script, you also need to grant it execute permission, or it won't run automatically due to permission issues.
References: