Skip to content

Using rsync to back up websites or folders across the network very simply

Step 1 — Make the destination folder on your backup drive On your local machine:

mkdir -p "/media/Linux_Extra/Website-Backups/AdGuard"

Step 2 — Change permissions on lpt-dell so you can read the files On lpt-dell:

sudo chown -R mark:mark /home/mark/adguard-home

This makes sure you own all AdGuard’s files, so rsync can read them.

Step 3 — Run rsync backup On your local machine:

rsync -av mark@lpt-dell:/home/mark/adguard-home/ /media/Linux_Extra/Website-Backups/AdGuard/

That’s it. If this works, we can later make it fancier (add sudo, include multiple backups, etc.), but this basic version shows how rsync works and how easy it is to use.

How to install Rsync.

Check if installed first.

rsync --version
If not installed:

sudo apt update
sudo apt install rsync
Once rsync is installed on both ends, your commands like:

rsync -av user@source:/path/to/files /path/to/destination

will work as long as SSH access is set up.