What is the most elegant backup solution for dual boot systems?
I'm planning to install Arch alongside my existing Windows 10 desktop system. In the future, I want a high-core cpu so I can have Arch be my primary OS and W10 in a VM, but for now dual booting is my best option. Currently, I use Macrium Reflect to automatically make regular backups of my system partition over to my data drive, and then again a backup of the whole data drive to my external drive (I know it's not a super-secure setup, but I don't have anything too important to lose so these backups are just to recover if a drive happens to die.)
Since Macrium Reflect isn't available on Linux, I want to set up an alternative that can function in a similar way. What I need is something that can make a proper restorable backup of both my Windows (ntfs) and Linux (ext4) system partitions from within Linux. I need at least the Linux backup to be live so I can have it running while I use the system (the W10 backup can be offline since it won't be mounted anyway.) If there's a way to make incremental backups that would be great, but I'd settle for weekly, whole, compressed images.
Finally, my data drive will remain ntfs for now, and I simply want it to be synced over to my external drive. I think borg backup is probably the solution I want to use here, but I'm not sure if it supports ntfs properly. Does anyone have any experience with this? Perhaps a simple rsync would be better here?
From the research I've done, I think I might want to use Veeam as the multiplatform alternative to Macrium Reflect, but the wiki has no mention of it even though it is on the AUR, and also I'd rather use FOSS if available. Does anyone know if there is an equally elegant FOSS alternative to Reflect/Veeam that is good for both Windows and Linux system partitions?
About this post
- Posted
- Archived
- Score
- 79 · 98% up
- Kind
- Text
- ID
- o7c7ia
21 comments
So in my environment I have two physical drives with windows installed on one and Linux on the other. My windows environment boots straight to a VHD file so my entire disk is a virtual file but I have complete physical hardware access everywhere else. My Linux side will rsync my VHD file to my NAS on a periodic basis and I use ZFS on my Linux side. It’s not a true backup on the Linux side but I can revert when necessary.
You made the entire disk into a VHD file? That sounds interesting, could you explain how you did that?
It's an old trick (Windows 8.1 at least was already capable of it), here's a tutorial I found: https://devblogs.microsoft.com/cesardelatorre/booting-natively-windows-10-from-a-vhdx-drive-file/
Does this help - https://borgbackup.readthedocs.io/en/stable/deployment/image-backup.html
IT suggests that my idea of creating images of my system partitions onto my data drive, which I then backup again with borg, is sound, but it's not really an "elegant" way to do it. I'm having trouble understanding exactly what those scripts do, and then automating it would be a whole other challenge for me, let alone remembering how to restore correctly in the event of a data disaster. I'm hoping that there's a tried and true method of maintaining full backups of two operating systems easily. I figured there must be other people who want the same thing.
Deleted before we saved it.
Deleted before we saved it.
As far as I know, Borg itself does not support any file systems. In the case of ntfs, write access currently takes place using ntfs-3g. I have never had any problems with the tool. But it is just rather slow during certain processes.
I can also recommend Borg itself. I use it to back up my personal data (but on disks with a btrfs file system and on rsync.net, which uses zfs as a file system). Restoring data has also worked several times.
Those who want to use a graphical interface can look at Vorta. And if one does not want to create an own script, one can have a look at borgmatic.
I have a raspberry pi 4 Nas with my external disks, I usually just use a bootable USB to dd a img.gz either through the network or if I'm in a hurry I'll disconnect a drive from the Nas and plug it right into my laptop. I also make occasional backups with rsync, but nothing is automated
Bumbing this up because I want to know as well. I have 2 external: 1 for Linux and 1 for Windows 10.
For the Linux backup drive, I have 2 partition: one for Timeshift which works whenever I plug in my drive, the other partition is for data which I set a weekly reminder to drag and drop new stuff from my home folder like Movies.
For Windows 10 drive, I use the built in backup to a drive and choose my drive.
Also on Linux, my config files are backed up to Github and they are set up to be easily restored via stow.
So this means I carry 2 externals + set reminders on my phone to remind me to manually backup stuff.
As an former Mac user, I am still looking for something a la Time Machine.
NTFS support is the job of Linux kernel not the backup software. Backup software just makes generic syscalls that work on any file system.
The only issue that I can see are the file permissions if you try to restore windows partition since they won't be to mapped between Linux and Windows 1:1. The full disk image backup will fix this issue but won't be able to do incremental backups.
Yeah, it was the file permissions that were my concern with borg and ntfs. I assumed it would be fine, but I couldn't find any documentation or discussion that explicitly confirmed it. From I can tell, only Veeam seems to be able to make disk image backups with incremental updates on Linux (assuming the feature set is the same as the Windows client), though I'd need to use their recovery image to be restore a borked system. I'm still trying to decide between Veeam and something safer like ntfsclone, though the latter would be harder for me to maintain.
BTW ntfs-3g has a user mapping feature to map the users between Linux and Windows:
https://man.archlinux.org/man/ntfsusermap.8
https://jp-andre.pagesperso-orange.fr/ntfsusermap.html
There is also https://man.archlinux.org/man/ntfsclone.8.en from the same ntfs-3g package
Question: if windows is in a vhdx file, why not just use Timeshift?
I don't know, I'm not familiar enough with Timeshift or any other Linux backup utility to be able to compare all of their methods. Now that you've mentioned it I'll look into Timeshift to see if it does what I want.
Edit: I understand your comment now. Windows isn't in a virtual drive right now, it will be a real partition in my current pc. My next pc will have Windows in a vm, so my backup solution then will be much easier. At the moment, Timeshift doesn't do what I need for a dual boot system.
Yep. I've also take notice you have a NTFS partition with your data, right? Timeshift won't cut in such scenario.
A couple of things to consider..do you want blocks or file level backups? Does you need versioned backups or is just one copy of a backup sufficient? If versioned how many copies do you need or what's the retention policy? Don't the backups need to be encrypted? Backups could also be taken at file system level if you were to use something like zfs. There isn't a one size fits all solution here unfortunately.
I'm a bit surprised that my ideal setup isn't as popular as I'd expect it to be. I don't need encryption or even versioned backups (though two or three versions is welcome, space permitted). I just like the idea of having a copy of my whole drive no older than two weeks, which I can safely restore from if a drive fails or I bork my system. Clonezilla would be a good option if it could automatically backup my live Linux partition, but maybe I could just use it for the Windows system and use btrfs for my Linux system. I don't know, I'll have to try out a few different options.
I have a setup similar to yours with a dual boot on a single drive with a shared NTFS data partition. For Windows I use the free version of Veeam, for Arch I use rsync and for the shared data partition I simply copy and paste either from Windows or Arch to the external disk that I also use for backup of the other partitions. All three of these procedures can be done live, I do not know if it is elegant but it is functional as well as fast and efficient.
I run borg from Linux on a schedule (backs up to my server). This is only backing up files and folders, so restoring Windows still means I have to reinstall and set it up manually, unlike Macrium images. That's fine for me as I care about the files, not OS.
Why not use Clonezilla to backup the system/OS partitions and then use Borg to backup the data partition, like this guide says? I'm thinking of doing this too.
The only downside is that it can't be automated, since it's a cold system backup scheme.