On this page

Backup Files

Feb 04, 2023

#linux #backup


Rsync

rsync is a tool widely used for copying and synchronizing files between two locations.

User permission

sudo chown -R <user_name>:<user_name> /data
rsync -a --delete --quiet  $HOME/data $HOME/Backup/

^ back to top ^

Rclone

rclone is for handling data between two remote. It can copy from local server to remote server as well as capable of synchronizing files between two remotes.

First configure the rclone remote drive

rclone configure
rclone sync data:/ gdrive:/

Gui

rclone also has nice gui to work with

rclone rcd --rc-web-gui

Cron job

Before runnig cron job, start the cronie.service

sudo systemctl start cronie.service
sudo systemctl enable cronie.service
$ EDITOR="nvim" crontab -u <username> -e
0 1 * * * rsync -a --delete --quiet $HOME/data $HOME/Backup/
10 1 * * * rclone sync data:/ gdrive:/