Back-up Server Old Setup

This is an old revision of the document!


Prev  
 Next

Back-up Server Old Setup

This has been more difficult than I would have thought. I have used rsnapshot the past couple of years (2020-21), but have never really been happy with it for many reasons. The main reason is that it has never worked well, the rsync is reasonably fast, but the rsnapshot takes far too long. Other problems include; difficulties in set-up, and concerns will reliability. Recently I noticed that Debian no longer includes it in its repositories as of Debian 11 due to poor maintenance….. So I have no moved to Restic, which is described here: Back-up Server Setup.

overlayfs

I was disappointed with overlayfs, it does not seem to allow for a true merge file system, just overlay file system. The information available to set up was some of the worst I have found to date for Linux in the modern day. It is the only solution built in the Kernel. I looks like it may be of some use with containers, such as Docker. It does not really interest me at this time and I am not using.

tl;dr;

mergerfs

In the end I has stopped using mergerfs. There are other options to combine drives, e.g. lvm or simplely using symlinks.

tl;dr;

LVM

With the availability of Gparted to adjust partitions on the run I do not know if LVM is required any more. It does however look like a flexible system.

Command example LVM PV VG LG
s pvs
display pvdisplay
create pvcreate
rename vgrename
change lvchange
move vgmove
extend lvextend
reduce lvreduce
resize lvresize
split vgsplit
merge vgmerge
convert vgconvert
import vgimport
export vgexport
importclone vgimportclone
cfgbackup vgcfgbackup
cfgrestore vgcfgrestore
ck vgck
scan vgscan 1
mknodes vgmknode
remove vgremove
dump vgdump

1. diskscan

Links:

NFS

To mount a NFS manually:

  • sudo mount -t nfs -o rw,vers=4 192.168.1.5:/export/Disk1 /mnt/backup1
  • sudo mount -t nfs -o rw,vers=4 192.168.1.5:/export/Disk2 /mnt/backup2

Where:

  • -t nfs : type nfs
  • -o : options, options are separated by commas with no spaces
    • rw : read / write
    • vers=4 : version 4 of nfs
  • 192.168.1.5:/export/Disk1 is the remote exported NFS mount point
  • /mnt/backup1 : is the local mount point, note this directory must exist, ideally empty, any existing contents are usually invisible and otherwise ignored

To unmount:

  • sudo umount /mnt/backup1
  • sudo umount /mnt/backup2

Where:

  • /mnt/backup1 is the local mount point to be unmounted

Possible mount script

Created script to mount backup1 sudo bash ~/Myscripts/mount_backup1.sh to run

''sudo vim ~/Myscripts/mount_backup1.sh''

Created script to mount backup2 sudo bash ~/Myscripts/mount_backup2.sh to run

''sudo vim ~/Myscripts/mount_backup2.sh''

As we intend to shutdown the backup server it is good to unmount the back-up drives first.

Created script to unmount backup1 sudo ~/Myscripts/unmount_backup1.sh

''sudo vim ~/Myscripts/unmount_backup1.sh''

Created script to unmount backup2 sudo ~/Myscripts/unmount_backup2.sh

''sudo vim ~/Myscripts/unmount_backup2.sh''

Backup main Media drive (Rsync / Rsnapshot method)

Sadly I have found Rsnapshot and Rsync is not suitable for large backup service. Rsnapshot is simply too slow and I am concerned with reliability. Rsnapshot configuration is overly complex, with strange requirements such as tab for white space. As of Debian 11 it is no longer even included in the Debian repositories for lack of maintenance. It feels effectively abandoned.

Superseded, tl;dr;


rsnapshot backups

I have 2 rsnapshot backup configurations;

/etc/rsnapshot1.conf To run locally: sudo rsnapshot -c /etc/rsnapshot1.conf daily

sudo vim /etc/rsnapshot1.conf

with all comments

with no comments

/etc/rsnapshot2.conf To run locally: sudo rsnapshot -c /etc/rsnapshot2.conf daily

sudo vim /etc/rsnapshot2.conf

with all comments

with no comments

As these backup are made to nfs mounts it is very important the at nfs drive are mounted, or the backups will go into the local mount points and fill the local disks.


String the Scripts Together into a Backup Master Script (Rsnapshot)

Superseded, tl;dr;

sudo vim ~/Myscripts/server_backup.sh

server_backup.sh code


/app/www/public/data/attic/home_server/home_server_setup/other_services/back-up_server_old.1661566815.txt.gz · Last modified: 2023-04-30 Sun wk17 17:43
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International