Timeshift & Similar Solutions - Safeguard & Recover Your Linux

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,810
Reaction score
1,903
Credits
17,317
So I opened my eyes and noticed that TimeShift gives you an advanced options menu to pick and choose your poison your grub options.
So this time, I unticked everything in that menu, and performed a restore on a perfectly working 20.04 Kubuntu system, restoring it to 21.04 Ubuntu.
This time I got successfully to the grub screen, but the Ubuntu entry let me to a black screen with an obscure error message that I failed to take a pic of.
@Shmu26 so whats the current status of your PC ? have you got another thread somewhere , thats a general fix not specifically timeshift ? I previously re-installed grub on endeavourOS from a usb
 


OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
& see if you can take a pic of that screen next time it occurs.

Cheers :)

Wizard
 

Shmu26

Member
Joined
Dec 11, 2018
Messages
88
Reaction score
26
Credits
570
@Shmu26 so whats the current status of your PC ? have you got another thread somewhere , thats a general fix not specifically timeshift ? I previously re-installed grub on endeavourOS from a usb
Still messing around with it. I got to the point where I could boot into Ubuntu 21.04 recovery mode.
I couldn't boot into Ubuntu normally because it said I needed to load the kernel first.
 

Shmu26

Member
Joined
Dec 11, 2018
Messages
88
Reaction score
26
Credits
570
Still messing around with it. I got to the point where I could boot into Ubuntu 21.04 recovery mode.
I couldn't boot into Ubuntu normally because it said I needed to load the kernel first.
Any ideas how to repair it if I can get into recovery mode or tty?
The Ubuntu partition looks like this:
2021-08-13_12-52.png
 

Shmu26

Member
Joined
Dec 11, 2018
Messages
88
Reaction score
26
Credits
570
Apparently it was a corrupted snapshot, or a good snapshot of a corrupted system. That's okay when you have lots of snapshots. :)
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
G'day Shmu, does that mean you have made progress, or are still in need of assistance?

Wiz
 

Shmu26

Member
Joined
Dec 11, 2018
Messages
88
Reaction score
26
Credits
570
G'day Shmu, does that mean you have made progress, or are still in need of assistance?

Wiz
No need of assistance right now, thanks. I got to where I wanted to be.
But maybe you could explain to me the option in Timeshift restore for updating initramfs. What is it and when would I want to use it?
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
No need of assistance right now, thanks. I got to where I wanted to be.

Excellent news. :)

But maybe you could explain to me the option in Timeshift restore for updating initramfs. What is it and when would I want to use it?

Briefly, typically, it is recommended for use if the first attempt to restore a snapshot fails. I will try to give you some more info here next day or two, have to leave for my Sunday evening shortly.

Cheers

Wiz
 

Shmu26

Member
Joined
Dec 11, 2018
Messages
88
Reaction score
26
Credits
570
No need of assistance right now, thanks. I got to where I wanted to be.
But maybe you could explain to me the option in Timeshift restore for updating initramfs. What is it and when would I want to use it?

Excellent news. :)



Briefly, typically, it is recommended for use if the first attempt to restore a snapshot fails. I will try to give you some more info here next day or two, have to leave for my Sunday evening shortly.

Cheers

Wiz
About initramfs: I recently installed Kubuntu 21.10 onto a btrfs partition, and then I ran a Timeshift restore job onto it, using a backup I had made from my old Kubuntu system that was on a traditional ext4 partition. I enabled the Timeshift option for updating initramfs.
What I got was a properly booting Kubuntu system on btrfs, with my old Kubuntu system. The fstab was updated to work with the btrfs subvolumes.
This turned out to be a surprisingly easy way to convert my system from ext4 to btrfs.

When I then tried to make Timeshift snapshots the btrfs way, it worked when I only backed up the @ subvolume. But when I tried to include the @home subvolume, I got an error:
Code:
Only Ubuntu-type layouts with @ and @home subvolumes are supported

This is strange, because this is exactly the layout I have.

Code:
sudo btrfs subvolume list /

ID 256 gen 195 top level 5 path @
ID 257 gen 95 top level 5 path @home
ID 283 gen 123 top level 5 path timeshift-btrfs/snapshots/2022-01-07_08-51-33/@
ID 284 gen 148 top level 5 path timeshift-btrfs/snapshots/2022-01-07_09-01-57/@
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
Now THAT is interesting - thanks for sharing, Shmu :)

I can't help you with the BTRFS side, don't know enough about it.

Tony George has a point for Issues here

https://github.com/teejee2008/timeshift/issues

You may be able to post there with a question.

Or others here using BTRFS may have ideas, in which case they are welcome here.

Keep us posted on how you go, if you would.

Cheers

Wiz
 

smooth_buddha

Active Member
Joined
Feb 13, 2020
Messages
362
Reaction score
244
Credits
1,648
Hey guys i gotta Arch system up and runnning and was curious how u guys "back up". Ive heard people online talking about ho they save their config files on github . I also recently seen the wizard did a great post on timeshift which got me thinking about backing up both data and my system configs so i if and inevitably when i break my Arch again i dont have re isntall everything and reconfigure everything. Im currently running virutal machines so its not a major issue as i have been cloning my arch systems so i can play - break - and repair ect.
But eventually when im confident enough i will be installing Arch onto real hardware and would be nice to have some idea of baking up and saving config files.
Is it a case of saving individual config files and saving them on github or is there a way to save and back up all my system configs in one foul swoop?????
any wisdom on this matter much apprechiated!
 
D

Deleted member 128018

Guest
I'm no expert on Timeshift but I have it installed on a couple of my desktops.

It's easy to set up just follow the prompts.
I don't have my configured for automatic backup.
I just manually run a backup whenever and save them to another drive.

I backup everything that's able to be backed up takes maybe 5 minutes depending on how much you got on the HDD/SSD.

I haven't had to use it yet since I installed it but give me time I will. :p

@Condobloke and @wizardfromoz see to have the scoop on Timeshift so they'll probability stop by here and give ya better info.
 

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
388
Reaction score
447
Credits
3,974
Hey guys i gotta Arch system up and runnning and was curious how u guys "back up". Ive heard people online talking about ho they save their config files on github . I also recently seen the wizard did a great post on timeshift which got me thinking about backing up both data and my system configs so i if and inevitably when i break my Arch again i dont have re isntall everything and reconfigure everything. Im currently running virutal machines so its not a major issue as i have been cloning my arch systems so i can play - break - and repair ect.
But eventually when im confident enough i will be installing Arch onto real hardware and would be nice to have some idea of baking up and saving config files.
Is it a case of saving individual config files and saving them on github or is there a way to save and back up all my system configs in one foul swoop?????
any wisdom on this matter much apprechiated!

TL;DR: Your .dotfiles would go in duplicity, not in timeshift. Timeshift is designed for system-wide state, not user-related content or configuration

I have been using timeshift and duplicity for a while, until the timeshift Fedora package was broken on a Fedora upgrade. Each one for their own purpose:
  • Use timeshift for creating snapshots of the whole machine except the user directories, that is, except /home and /root
  • Each user should use duplicity to an external drive for their own user directory.
    • You should not log in as root in systems that work with sudo, therefore no content should be at /root.
    • If that is not your case, the root account should also have a duplicity workflow.
As the timeshift developer explains in both the documentation and the wizard:

User Data is Excluded by Default​

Timeshift is designed to protect system files and settings. It is NOT a backup tool and is not meant to protect user data. Entire contents of users' home directories are excluded by default. This has two advantages:
  • You don't need to worry about your documents getting overwritten when you restore a previous snapshot to recover the system.
  • Your music and video collection in your home directory will not waste space on the backup device
The documentation gives some indications should you wish to proceed, but a very important note at the end of that section, that justifies why is that behaviour the default
Note: It is not recommended to include user data in backups as it will be overwritten when you restore the snapshot.
That's why one would use both timeshift and duplicity.
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
It certainly can't hurt to use both Timeshift and Duplicity hand in hand.

@old timer has it pretty down pat, but friend Gabriel @gvisoc , I have to disagree on the .dot files. You are using, if I am not mistaken, Fedora with BTRFS in place of EXT4.

Buddha are you using EXT4 with your Arch?

If so, you simply tweak the settings for Timeshift as follows shortly.

What I will do is copy Posts 1 - 4 to my Timeshift Thread here

Timeshift Thread current page

Note that that is at page 14, if you want to read from the beginning, just lost the page 14 part.

Why pick it up over there?

Because that Thread has 106,000 viewers and ranks highly in the search engines, so we can reach and help a wider audience there.

See you there ;)
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
I said earlier

If so, you simply tweak the settings for Timeshift as follows shortly.

In the first screenshot is how I use the Users tab in Settings.

ASPDX8G.png


So everything in my Home Folder is included in the snapshots, including all hidden files. I also have my /root covered. In particular, because the file .bash_history in Home is separate to the .bash_history in /root, and I like to keep them both safe, as I use unlimited scrolling.

Be aware though, that this /home/chris only takes up 1.5 GB because I keep Documents, Videos and so on safeguarded elsewhere.

If you are into extensive video or sound editing, or a Gamer, your Home may be huge, in that case you might want to account for them separately, whether that be with Duplicity or other.

In Timeshift you can do that with the Filters tab, mine (unused) looks like this

cFIRhFG.png


The + sign column means they are included, if you used the - (minus) sign, excluded, so you could add the Folders and Files at the bottom you wish to cover.

How much to allow for Timeshift snapshot? Check with GParted or Gnome Disks the space consumed in your current root partition. Timeshift does not employ compression, that is, it is 1:1 - so if your OS is 10 GB large, allow 12 GB for the snapshot. Timeshift gets a bit itchy if the dedicated partition it is housing snapshots on falls as low as 1.x GB space left.

Any questions fire away.

Wiz
 

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
388
Reaction score
447
Credits
3,974
So everything in my Home Folder is included in the snapshots, including all hidden files. I also have my /root covered. In particular, because the file .bash_history in Home is separate to the .bash_history in /root, and I like to keep them both safe, as I use unlimited scrolling.

Be aware though, that this /home/chris only takes up 1.5 GB because I keep Documents, Videos and so on safeguarded elsewhere.

If you are into extensive video or sound editing, or a Gamer, your Home may be huge, in that case you might want to account for them separately, whether that be with Duplicity or other.
I was waiting for this to come to comment further on your disagreement back then on the .dotfiles. I am still not clear what would be the advantage of moving them to timeshift, regardless what my filesystem is (*).

A few thoughts about my specific case:
  1. My home is huge. It is currently 88 GB. Fedora is my daily driver and I have all my cloud services synced on to my home folder using Insync. Although cloud file services are not backups, I tend to bend that rule and I include them on duplicity to comply with the 3:2:1 rule when it comes to backups (3 sets of data; 2 backups; 1 of that backup in a remote location)
  2. Duplicity backups go to my NAS, encrypted. For timeshift, I had a maximum of 5 snapshots at my system partition. The idea would be to use them as "restore points after immediate update drama", meaning that I would have to be very distracted to have to use other snapshots older than the first, so there you go: 5 just in case the lols.
  3. I used to use timeshift manually before upgrading the system or before making changes in the configuration, manually, system-wide. On the contrary, my .dot files and directories change as my usage and I need a daily backup for them. Restoring a timeshift snapshot and having my .dotfiles modified can break some of my workflows. Just one example from the top of my head: the Audacity macros I use to export my process the sound, align the tracks, put the metadata... of podcasts with 1 click are inside .local/, not inside its projects' directories. If I change those macros during a work session with it, but .local doesn't get snapshoted until the next system upgrade, I may lose actual work.
  4. Getting inside the .dotfiles to cherry pick which of them go to duplicity and which of them to timeshift seems a bit overwork for me, and prone to human error.
So, my question is: what is the advantage of using timeshift for just the .dotfiles and leave the rest (documents, media libraries,...) on duplicity?

---
(*): note: fedora's filesystem definitions for BTRFS don't work on timeshift (i.e.: it does not allow you to use BRTFS snapshots) due to a naming convention that I no longer remember: timeshift stoppped working after Fedora 34 and didn't find time to tinker a solution to it.
Therefore, timeshift on fedora if it works ends up being limited to rsync snapshots.
 
Last edited:
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
timeshift stoppped working after Fedora 34 and didn't find time to tinker a solution to it.
Therefore, timeshift on fedora if it works ends up being limited to rsync snapshots.

hash 2 and hash 3 I wrote here

https://www.linux.org/threads/watch-out-timeshift-is-broken-in-fedora-35.37511/#post-140848

fixed it for EXT under Fedora 35.

I am still not clear what would be the advantage of moving them to timeshift, regardless what my filesystem is (*).

I may not have made myself clear enough. :)

For me, $HOME contains all my settings for my DE, my browsers, my Solitaire games score, and on and all - that is, in addition to the .dot files.

So I do the whole kit and caboodle with my Timeshift snapshot.

That also means, I can go to an entirely different drive or even a computer elsewhere, and install my OS exactly as I like it. Putting a Timeshift snapshot onto a USB stick of sufficient size, and having a Live install stick to access the snapshot means Have Computer Will Travel.

My home is huge. It us currently 88 GB.

So you want a different solution, fair enough. That is exceptionally large, rather than the rule.

Cheers

Wiz
 

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
388
Reaction score
447
Credits
3,974
Ah, OK. I'm on BTRFS. I understood that somehow using BTRFS was adding a component to the ".dotfiles discussion" that I was missing.

There is a patched version at a copr repository that I may end up trying if they keep being so slow on patching it on the official RPM repositories.

But, I have to say, Fedora 35 has been so stable, and I modify the system so little, that I am even questioning using it v. developing a dnf query to restore my manual installations from scratch with a script.

(I haven't had to modify things other than the /etc/hosts for my convenience, and a specific firefox-related thingie thing)
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,207
Reaction score
6,118
Credits
24,208
You are using, if I am not mistaken, Fedora with BTRFS in place of EXT4.

I know, Mate, have you tried the method, though?

sudo dnf install crontabs

And also at your Thread on a broken Timeshift for Fedora 35, I had this

A Google search under

fedora 35 timeshift

provided fresh meat, in this

https://ask.fedoraproject.org/t/fedora-35-fresh-install-timeshift-only-live-usb-mode-error/17847/2

and the second link in that, this

https://copr.fedorainfracloud.org/coprs/oprizal/timeshift-upstream/

Now, be aware that COPR (Cool Other Packages Respository) is a community-based group in a similar way to how the AUR is to Arch. Not official, but usually works if you are game to try it.

This involved rowing my boat upstream over what Fedora had to offer, which was an old 20.03 version of Timeshift, to get the 21.09 version I am used to elsewhere.

Works like a charm, both in snapshotting, AND restoring, and I am writing from my fixed up Fedora.

So between one and the other you can get working with it if you wish.

Wiz
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top