Goal is to backup entire home directory and /etc on a daily basis. This will include qcow2 images for win10 VM.
- Created
/mnt/restic/
disk on 4 TB spinning SATA drive. - Created directory
/mnt/restic/restic-repo/
to store data in - Create a password file with just the password string at
~/.restic.passwd
- Run initial repo creation
sudo restic init --repo=/mnt/restic/restic-repo/
- Run backup on kaim-eeyore machine to internal 4 TB disk with:
sudo restic backup --repo=/mnt/restic/restic-repo/ --exclude-caches --one-file-system --password-file=/home/andrew/.restic.passwd --exclude-file=/home/andrew/.restic.excludes --verbose /etc/ /home/andrew/ /mnt/intel750/
- Run backup on kaim-eeyore or piglet to external 750 GB USB disk (after mounting with cryptsetup) with:
sudo restic backup --repo=/mnt/tosh/restic-repo/ --exclude-caches --one-file-system --password-file=/home/andrew/.restic.tosh.passwd --exclude-file=/home/andrew/.restic.tosh.excludes --verbose /etc/ /home/andrew/ /mnt/intel750/
but ignore the intel750 path for piglet.
- Make a /mnt/restic-fuse directory:
sudo mkdir /mnt/restic-fuse
- Mount, via FUSE, the restic repo:
sudo restic mount /mnt/restic-fuse --repo=/mnt/restic/restic-repo/ --password-file=/home/andrew/.restic.passwd --verbose
- Go grab the files you need from /mnt/restic-fuse/
- Ctrl-C to exit from the restic mounting
I still need to:
Create a list of excludes (ie: downloads and sstate-cache for yocto builds).Done, see--exclude=file=
above.- Determine a sane forget/purge strategy, to only keep the last X backup snapshots.
- Setup a crontab to run every night.
Understand what impact running restic with win10 VM running has, as the backedup qcow2 images will be while Windows can write to "disk."So long as wesudo virsh suspend win10
then do the backup thensudo virsh resume win10
then at least Windows won't modify the disk during the backup, although booting from it afterwards may look like an unclean shutdown.Understand the dedup of large files that only slightly change (dedup is file based or block based?).The dedup looks to be block based for large files (https://restic.readthedocs.io/en/stable/100_references.html#backups-and-deduplication) and this appears to work both across and within files.