Hello guys, I want to share with you my personal backups strategy, sometimes we were in this conversation but I never went so deep.
My goal is backing up a Linux Os, which is installed on a 500gb ssd sata hard drive, which having 500mb of EFI boot partition and rest of the disk is occupied by an XFS partition, the main OS partition, with files, home folder, data, virtual machines folders and various installed software.
Before this 500gb hard drive I had Linux installed in a 240gb hard drive, but I prefer to switch to a 500gb one, which is less worn-out and more robust. The new disk is a Western Digital blue ssd SA510. Highly reccomended Western Digital disks.
More than this main hard drive my needing are backing up some files such as projects and other important stuffs which are located in a secondary hard drive, and backing up some other Windows machines.
My organization with backup is using a single external 4tb USB hard drive, I don’t own a NAS infrastructure, because my setup is an homelab, and having such complicated backup system is overweight.
I decided to save all my backups in a single NTFS partition, saving both Linux and Windows machines. I know I might use some native Linux tools such as Timeshift or Borg backups software solutions, but these tools requires to have a dedicated Linux file system, and the point is I don’t want to split hard drive in different partitions.
So, for backing up the main 500gb hard drive I decided to boot up the system in a Gparted Live environment and launch the command dd
.
So far I discovered the dd tool can do disk images and skipping empty hard drive blocks, with the cli parameter: conv=sparse
, so in the end the final .img will result smaller then the original disk size and also the entire process requires less time then doing a byte per byte disk image.
Beside the main disk backup I keep a separate EFI partition image (in case of extreme disaster)
The final command for the main os partition it will be:
dd if=/dev/sdx2 of=diskbackup.img bs=2048M conv=sparse status=progress
And the final command for EFI partition it will be:
dd if=/dev/sdx1 of=EFIdiskbackup.img bs=128M status=progress
Notice I’m using different block size because EFI partition is just 500mb and the imaging process will be quick enough.
For backing up the separate drive I’m still saving its backup on the same NTFS external hard drive: the hard drive where I have all the important stuffs is formatted in NTFS, and mounted in Linux with an fstab entry, so I take specific folder backup sync with the software AOMEI Backupper (I bought the legal license) which is booted in a live Windows PE environment.
For the other Windows PC it’s not a real problem, I just do incrementals backup with AOMEI Backuppers.
In the end I have all my backups in a single USB drive, which is daily disconnected from computers, moreover this hard drive is located in a box somewhere in my house and physically keylocked.
I have scheduled my manual backups once each two weeks, generally on sunday morning.
I know this might be considered a bit paranoid behaviour, but you guys just think I daily work alot with computer, and I can’t lose all my projects.
Might this post be useful to some of you which are struggling a little on backups, trying to find their way..
I just want to say I tried different backups solutions, mixing Linux and Windows tool and filesystems, but now I think this is my nearly final stage of developing the workflow.