Hi. I’m currently using the Linux distro Ubuntu. I’m about to install Arch on the same internal drive in my laptop, and I want to be able to dual boot into both. It’s important that I backup my current setup in case something goes sideways. So I’m trying to ensure I backup everything necessary for a proper restore if needed. I’ve successfully installed Duplicati and restored individual directories with positive results, but I’m not sure I’ve included all the directories required.
I’m looking for advice from those who’ve successfully restored a Linux OS and their suggestions on which directories are important. Currently, I’m backing up the following 8 . . .
Should /boot not be included, or will this work against me on the Arch dual boot?
I’ve chosen these 8 because of other Linux articles on other websites. However, I would like confirmation from those using Duplicati on Linux what has worked for them.
As an aside, I have invested considerable time in trying to find on this forum where this has been asked before. When I search for anything like the search phrase “which directories should I backup in linux” (and many derivatives), I get a tremendous amount of responses with none of the titles describing which directories to backup. I’ve read many of the offered threads, and none have addressed my question.
Even the notice when I started this thread, “Your topic is similar to . . .” none of the ‘similar to’ come even close.
I’m sure it’s me, but if anyone could also point me to any applicable threads I would appreciate it.
Thank you for the welcome and reply. I read that post a couple of days ago. It lists 4 directories, which I already had included in my 8. My previous research shows that just those directories mentioned in the link would not have been complete for a successful restore.
I’m not even sure I can identify that 4, but link there lists a huge number of others, however opinions varied. Some might apply to some setups, and others to others.
What does success mean? As I wrote in the linked topic, restores can be complex.
/home is probably easiest, done with apps down. OS files with OS up may be hard.
This is a limitation of any file based backup as compared to images handled offline.
If anyone’s given a guaranteed way to restore OS files into live OS, I’d like to know.
Generally, OS and OS config can be done from scratch, although records can help.
Personal data can’t be replaced as easily, so that, IMO, is the main thing to protect.
I suppose you can guess the chance of that to guide the backup/restore planning.
For example, if you give 75% chance it will go badly, maybe clone the drive first…
These are the sort of uncertain times when you’d rather have a VM with snapshot.
FWIW I’m not confirming anything because I haven’t done it.
Maybe someone else has, but this is a very YMMV situation.
@ts678 Thanks again for all your help. As you know, the link in your first sentence above has a link to a post you made in November of 2023. It contains a link to another thread on StackExchange. This is one of the most helpful posts on that particular thread . . .
Coincidentally, that thread came up a few days ago in my research, and I had it bookmarked. That post helped influence my current directory choices.
I thought since that thread had some age on it (14.5 years) I would keep at it to see what might have changed over the decade plus.
About a week ago, I did clone the drive in question. I might be misunderstanding, but if I were to restore from it, wouldn’t it overwrite the Arch install also? The cloning took several hours. I was hoping, if necessary, to restore discriminately what was needed vs. going to an out of date snapshot from days before.
I’m not sure about this clone restore process; please do not hesitate to correct me if I’m wrong.
I’m only a few months into the Linux OS, but it is my current production environment. I think what I’m going to do is buy another 2TB external SSD this week. Dup the current environment, back it up, f*** it up, then try the selective install to judge the potential restore integrity of the live drive in a sacrificial setting.
Also, as you’ve mentioned, (me paraphrasing) it seems that everyone’s install might have important files in different areas. Going to work on a script that summarizes the location on what gets added/changed whenever the script is run from the last time it ran. This might allow me to discover files located in areas that should not be missed.
@ts678 I realize I’m probably making this more granular for most but it’s all fun and games till you lose days worth of time. I’d prefer to spend a fractional of that time on the front end while I still have a functional system.
If it was the whole drive, it would, but Arch is brand new, so not valuable, and you get your valuable data put back so you can try again. Some Linux partition/image backup programs might give more flexibility on complex multi-OS setups. I don’t keep track…
A combination approach can work. Given some uncertainty about exactly which files have extreme value (or are updated a lot), you can do those with file backup, and if others are thought of after actually trying to reassemble, there’s at least a stale copy, provided one can get to it. Windows image backup tools frequently allow file browse. Again, I’m not sure if your tool allows browsing an image or if one can only write it all.
My Linux systems are mostly minimal test systems. My production is Windows with a rarely done image to external drive (withstands ransomware but not physical abuse). That’s the lower value and infrequently changed stuff. Duplicati does a small daily set. Figuring out where apps hide their data takes some doing, but better now than later…
On Linux, beyond just nosing around, the find command can help see the changes. Some (e.g. OS?) you might not care about, but it might also see app or personal data. Some people might have a lot of Linux customizations. I don’t, so backup gets easier.
Interestingly, I’m trying to figure out how to move Windows 10 (retiring October) to 11, which also means new hardware (old is OLD), so am trying to strategize how to do it.