Backup Script Best Practices

I want to back up my /data/ folder and exclude some subfolders such as /data/plex/
I also want this backup to maybe use 1G of memory and 20M of upload.
How would I include the 1G of memory and be sure that this script only happens for an hour every 12 hours.
Also, is it /plex/ in my exclude file or is it ./plex since it's a subfolder of the /data/folder?

crontab -e

0 */12 * * * /usr/bin/flock -n /tmp/upload.lock /data/bin/

if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then exit; fi
/usr/bin/rclone copy --log-file /opt/rclone/logs/upload.log -v --user-agent rclone --exclude-from /opt/rclone/exclude-file.txt --fast-list --copy-links --bwlimit 20M --config /opt/rclone/rclone.conf /data/ drive:data/



This is difficult to guarantee - you'll have to run rclone and tweak --checkers and --transfers.

--bwlimit 20M will limit rclone to 20 MBytes/s, if you wanted 20 MBit/s then use --bwlimit 2.5M

Use --max-duration 1h

  --max-duration duration   Maximum duration rclone will transfer data for

when using rclone for backup, i use a forever incremental backup.

rclone sync /path/to/source remote:full --backup-dir=remote:incrementals/`date +%Y%m%d.%I%M%S`

Thank you
I appreciate the help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.