Setting up a /home backup

Hiya folks,

I have two HDDs in my system (one is 3TB, the other’s 2TB), and an external 1TB drive.

I have had Arch installed on an SSD for about 2 years with one filesystem at /.

I’d like to do two things:

  1. Have a backup of my /home directory on the external drive.
  2. Have the two internal HDDs be mirrored (I use one for large file storage).

Right now I have shell scripts which run rsync commands to backup all the drives, but this is insanely slow. I don’t know much about filesystem management, but I’d love to learn!

Any help is appreciated! :slight_smile:

Fellow rsync script owner here :slight_smile:
Having rsync running against a machine with zfs and snapshots :stuck_out_tongue: very well knowing that there are other tools that could do the same / better job.

Have a look at https://www.borgbackup.org/ if you are interested in incremental backups, even if you are not going to use it for that use case.

To mirror for the disk I would put /home on a dedicated partition and either use mdadm, or ZFS.
I would even vote on switching to ZFS nowadays, setup a ZFS mirror - requirement are same-size disks and gives other nice features out of the box. (having ZFS would allow attaching an external disk and letting it resilver/resync all its data/snapshots)

I don’t have this setup on any Arch, only FreeBSD. There will for sure be someone in the forum that can give hands on experience and help with a proper setup.

1 Like

I’d definitely consider switching to ZFS for my three drives. My drive management is all messed up and has been for years.

If anyone could help with ZFS mirrors for this use case I’d be grateful!

any chance one of you could post the rsync script you use? I know fuck all about scripting it so i’d like to have a look.

@TheF1sh Main part basically consists of:

what_to_backp="/home/user/.password-store /home/user/Documents"
where_to="/mnt/localdisk2/backups/ srv1:/backups_mylaptop/ srv2:/data/backups_laptop"
for srv in $where_to; do
  echo "[I] Starting backing up to: $srv"
  for src_foldr in $what_to_backp; do
    echo "[I] Starting backup of: $src_foldr"
    rsync -avzh --progress $src_foldr $remote
 done
 echo
done

Is it decade old and ugly: yes
does it delete old files: no
does it allow me to rollback to an older “version” of data: no
would I recommend anyone adding an @daily cron: no
would i recommend BORG instead: definitely, yes

1 Like

Here. Probably not the best example. I have temp files created so that I can see what’s happening from my wm btw.

1 Like