Back-up Server Old Setup

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 Description (from man)
s pvs Display information about physical volumes
display pvdisplay Display various attributes of physical volume(s)
create pvcreate Initialize physical volume(s) for use by LVM
move pvmove Move extents from one physical volume to another
rename vgrename Rename a volume group
change lvchange Change the attributes of logical volume(s)
extend lvextend Add space to a logical volume
reduce lvreduce Reduce the size of a logical volume
resize lvresize Resize a logical volume
split vgsplit Move physical volumes into a new or existing volume group
merge vgmerge Merge volume groups
convert vgconvert Change volume group metadata format
import vgimport Register exported volume group with system
export vgexport Unregister volume group(s) from the system
importclone vgimportclone Import a VG from cloned PVs
cfgbackup vgcfgbackup Backup volume group configuration(s)
cfgrestore vgcfgrestore Restore volume group configuration
ck vgck Check the consistency of volume group(s)
scan vgscan 1 Search for all volume groups
remove vgremove Remove volume group(s)

1. diskscan

Links:

NFS

To check available server drives use sudo showmount -e 192.168.1.5

To mount a NFS manually:

  • sudo mount -t nfs -o rw,vers=4 192.168.1.5:/Disk1 /mnt/backup1
  • sudo mount -t nfs -o rw,vers=4 192.168.1.5:/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:/Disk1 is the remote exported NFS mount point (/export/Disk1 is no longer accepted syntax in NFS4.)
  • /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/pages/home_server/home_server_setup/other_services/back-up_server_old.txt · Last modified: 2025-01-03 Fri wk01 08:55
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