Because of a poor understanding of what the program does, and is for, I made the mistake of backing up my entire system (including all the /home and data files) with Timeshift. (I now know better and will be using a different backup strategy in the future!)
Because of some hardware changes that turned out to be more of a challenge than I anticipated, I have had to do a fresh install of Bookworm. This is actually about the nth install, the previous one was trashed when I attempted to do a Timeshift restore that appears to have messed up the boot files....
I have a lot of software that I've added over time, including some things that are not in the Debian repos, or are only present as (much) older versions, which I've had to compile from sources... I'd really like to avoid having to try to reproduce all that.
I'd like to do a SELECTIVE restore, putting back only the files or directories that have the things in them I need (i.e. probably /usr, /lib, /bin, and so on, but not the boot files, or most of what's in root....) but I can't find any descriptions of how to do this, despite considerable searching.... I've had two ideas about how to possibly do this, and am wondering if either seems possible....
1. Are there any restore programs that can work with a Timeshift snapshot, and do a more selective restore?
2. I see that when doing a restore using Timeshift, it asks you where to restore things to... I have plenty of spare disk space, if I told Timeshift to do the restore to a totally different drive (which I wouldn't need to boot), would I then be able to use other software to copy selected files from that restored drive back into my working system?
Thanks,
ex-Gooserider
[Software] SELECTIVE Timeshift snapshot restore
- ex-Gooserider
- Posts: 16
- Joined: 2024-04-09 03:09
- Has thanked: 1 time
- pbear
- Posts: 501
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 81 times
Re: [Software] SELECTIVE Timeshift snapshot restore
As I mentioned in your other thread, Timeshift doesn't support selective restore. (That's one reason it's not suitable for data file backup.) To my knowledge, there's no other app which can "work with a Timeshift snapshot." What you can do is copy files from snapshot to target with rsync. Indeed, I've pretty much stopped using Timeshift because I find it easier to do system restore with rsync (which I use for both system and data backups). I'm not comfortable, though, trying to coach you through a complex rsync problem on a message forum. Also, I've no experience restoring a system with directories split off to separate partitions. Based on research (several years ago), I use -axHAX as flags for system backup (only -a for data), where -x = don't cross file system boundaries. Might create mischief in your case (as you're restoring from a consolidated backup), but omitting it might cause mischief also.
- ex-Gooserider
- Posts: 16
- Joined: 2024-04-09 03:09
- Has thanked: 1 time
Re: [Software] SELECTIVE Timeshift snapshot restore
Thanks for suggesting rsync... I had thought Timeshift was a good solution, and now understand that I was mistaken... However my situation is now that the only backup I have is a Timeshift snapshot, and I would really like to recover at least some of the data out of it, especially the binaries and libraries that I had to bring down to work on my projects.
I'm thinking that if I do the following:
1. Pull the SSD (easy since it happens to be in a hot-swap bay) so that it can't get touched by my effort to restore w/ Tmeshift.
2. Boot off a live USB stick, and run Timeshift from it,
3. Restore the snapshot to some of the other drives in my system that I'm not using for anything else
4. Shut down, put the SSD back in, and boot off it...
Then I should have the system I'm using, with an off-line copy of the old install that I can mount parts of in order to access them, and use a basic file utility (i.e. Krusader) to copy files from the old system to the new install. (I might even use Timeshift for it's intended purpose of allowing me to roll things back if something does blow up...)
Does this sound like a viable plan, or is there some booby trap in it that I'm not seeing?
ex-Gooserider
I'm thinking that if I do the following:
1. Pull the SSD (easy since it happens to be in a hot-swap bay) so that it can't get touched by my effort to restore w/ Tmeshift.
2. Boot off a live USB stick, and run Timeshift from it,
3. Restore the snapshot to some of the other drives in my system that I'm not using for anything else
4. Shut down, put the SSD back in, and boot off it...
Then I should have the system I'm using, with an off-line copy of the old install that I can mount parts of in order to access them, and use a basic file utility (i.e. Krusader) to copy files from the old system to the new install. (I might even use Timeshift for it's intended purpose of allowing me to roll things back if something does blow up...)
Does this sound like a viable plan, or is there some booby trap in it that I'm not seeing?
ex-Gooserider
- pbear
- Posts: 501
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 81 times
Re: [Software] SELECTIVE Timeshift snapshot restore
Sorry, I don't understand what that plan is supposed to accomplish. Might even be brilliant, but I don't get it. My advice is that, if you want to use Timeshift, do what I suggested in your other thread. Restore the regular way, disabling reinstall of the boot loader. Also, make sure the path assignments for the various partitions are correct. And, I have to say, your problem isn't Timeshift's fault. You're asking it to so something for which it wasn't designed.
- ex-Gooserider
- Posts: 16
- Joined: 2024-04-09 03:09
- Has thanked: 1 time
Re: [Software] SELECTIVE Timeshift snapshot restore
Now that I have a better understanding of what it is and isn't suitable for, I don't WANT to use Timeshift, but I'm stuck with only having Timeshift snapshots as backups at this point, so I have to figure out some way to recover from them... Given that the last time I tried to restore with it, I broke the install that I'd made, (and that could very well be due to errors I made!) I don't feel comfortable trying to go directly from the TS snapshot to my working install.pbear wrote: ↑2024-04-30 03:20 Sorry, I don't understand what that plan is supposed to accomplish. Might even be brilliant, but I don't get it. My advice is that, if you want to use Timeshift, do what I suggested in your other thread. Restore the regular way, disabling reinstall of the boot loader. Also, make sure the path assignments for the various partitions are correct. And, I have to say, your problem isn't Timeshift's fault. You're asking it to so something for which it wasn't designed.
The idea of my plan is to create a separate isolated restoration of the snapshot, and get Timeshift completely out of the picture. I would then use a simple file copy to bring the software related files, i.e. binaries, libraries and so on from that isolated restoration to the working install. I.e. if my install is on /dev/sda, and my spare drive is /dev/sdf, a work-flow like this...
LiveUSB boot
TS snapshot -> restore w/ timeshift -> /dev/sdf
/dev/sda boot
Copy files from /dev/sdf -> /dev/sda
(Skip any files that already exist on /dev/sda)
The only thing I'm not sure about, mostly because I'm not sure just how Debian package management tracks what is installed on a system in order to do updates, etc. is if this would cause issues with future maintenance on the machine... Is this a problem? Are there other booby traps to worry about?
ex-Gooserider