rsync based back up to the local HDD
Disk backup for NFS region on k1nfs and k1boot is taken by borg system. Though it's robust, it takes a time to restore disks from backup data. On the other hand, disk trouble on k1boot induces a system down of whole digital system. So simple backup is useful to recover from disk trouble with shorter down time and is being run in parallel with borg back up system.
Basic implementation
- full backup
$ sudo rsync -av --delete --exclude lost+found /opt/ /mnt/backup/ | tee full-$(date +'%Y%m%d').txt
This is just a complete copy of /opt to /mnt/backup. Deleted files in /opt are also removed from /mnt/backup. So it doesn't basically support to restore files which are accidentally removed by wrong human operation. Depending on the cadence of executing this command, recent deleted files may be able to be restored. /opt and /mnt/backup are assumed to locate different HDD and switching mount point realizes quick recovering from the broken disk trouble of /opt.
- differential backup
$ sudo rsync -av --delete --exclude lost+found --link-dest=/mnt/diff_backup/opt-$(date --date='N days ago' +"%Y%m%d")/ /opt/ /mnt/diff_backup/opt-$(date +'%Y%m%d')/ | tee diff-$(date +'%Y%m%d').txt
