For Koofr or pCloud, you’ll need to choose the appropriate storage provider from the list and authorize rclone to access your account. Detailed instructions for each provider can be found below.
Test rclone
To ensure rclone is properly configured, test it by listing the contents of your remote storage:
$ rclone ls remote_name:
Replace remote_name with the name you assigned to the remote during the configuration process.
Create backup script
Create a shell script that will perform the backup using rclone. For example, create a file named backup.sh with the following contents:
#!/bin/bash
SOURCE="/path/to/your/data"
DESTINATION="remote_name:backup_folder"
rclone sync "$SOURCE" "$DESTINATION" --log-file /path/to/your/log/file.log
Replace:
/path/to/your/datawith the path to the data you want to back up on your VPSremote_namewith the name of the remote you configuredbackup_folderwith the folder name you want to use in your Koofr or pCloud account
Make the script executable
$ chmod +x backup.sh
Test the backup script
Run the backup script to make sure it works as expected:
./backup.sh
Check your Koofr or pCloud account to ensure the data has been backed up.
Schedule backup with cron
To schedule the backup, open your crontab with the following command:
$ crontab -e
Add a new line to schedule the backup script to run at your desired interval. For example, to run the backup daily at 3:00 AM, add the following line:
0 3 * * * /path/to/your/backup.sh
Replace /path/to/your/backup.sh with the actual path to your backup script.
Save the file and exit the editor. Your backup will now run automatically according to the schedule you defined.
Remember to monitor your log file to ensure the backups are running correctly and address any issues that might arise.