Timeshift discarded for backup - evaluation of backintime barred by freezing

Timeshift can be used, but is suboptimal. Besides not comfortable for this usage, it has a big problem: if you have a document mit multiple edits, timeshift will happily restore an older version over. And that is usually not one wants.
Other tools may warn you at least in such case.

1 Like

That’s wrong.
The files in //[backupmedium]/timeshift/snapshots/[date]/localhost/home/[user]/* belong to user and the group they’ve been backed up from.

1 Like

Browsing from Timeshift opens Dolphin browsing as Root and things get messed up. It’s one of the issues we have with Timeshift, but doesn’t matter if you use it only for system snapshots.

Excluding directories is done in the GUI apparantly, as I have in the config file, but have never edited the file by hand. Nevertheless, here it are:

$ cat /etc/timeshift/timeshift.json
{
[...]
"exclude" : [
    "/home/mirdarthos/**",
    "/proc/**",
    "/run/**",
    "/tmp/**",
    "/dev/**",
    "/mnt/**",
    "/root/**"
  ],
  "exclude-apps" : []
}

Interesting - so I have some more exclusions you might look into:

"/var/tmp",
"/var/log",

/var/tmp holds 1.3 GB for me, pamac build files… so omitting that is a quick ‘clean up’ on restore.

Then ‘/var/log’ is another big one, with journal (4.2GB) and another link leads also to Plex Media Server ‘Plugin Logs’ (plex loves to create hundreds of tiny text files).

For me it’s a big deal, I bought a nice SSD - but it’s only 250 GB, I like to keep 50-60GB free until I’m rich enough to step up to something like a 1TB WD Black (the SN770, or maybe 7100).

But obviously there’s the other reason to split Timeshift local snaps and Back-in-Time… nobody cares how much they use on a 4TB HDD, but on a system disk, it’s dead space.

2 Likes

Added, thanks!

It’s a big deal for me as well. I have my 5TB for documents, a 4TB for all backups, and my system disk is a 250GB Nvme SSD. But I did it like this so that I have the most space and speed for the best cost.

1 Like

Doesn’t on my systems.
And when opening it in Nemo I see the subdirectories of …/localhost/… with the appropriate permissions.
I can work in …/home/[user] as [user] …

I did now, and yes, ~/.cache is included. Bizarre! :face_with_raised_eyebrow:

Well, I for one do not support that statement. I use timeshift with rsync as my backup tool, albeit that I run the backup process manually — I don’t use a timer for this — and only after updating, removing or installing packages.

In addition to that, I also separately back up /home manually every day by way of a rather simplistic shell function.


While this is true, one can always mount the (sub)volume with the backup or snapshot and use cp to restore the individual files.

Granted, it does require a bit of knowledge on how to use the command line, and — for the newbies coming from a Mouse-Clicks R Us operating system — a fair dose of courage. :grin:

3 Likes

They did tell you. It’s because it’s not a backup utility.

It’s designed to restore your system (OS) to an earlier time. If you include home and then restore from a snapshot then you’ll lose data, it’s happened quite a few times.

Then people wonder why their data is gone. The answer is simple, they didn’t use the software correctly (according to the devs).

Timeshift for Linux is an application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS. Timeshift protects your system by taking incremental snapshots of the file system at regular intervals. These snapshots can be restored at a later date to undo all changes to the system.

Timeshift is similar to applications like rsnapshot, BackInTime and TimeVault but with different goals. It is designed to protect only system files and settings. User files such as documents, pictures and music are excluded. This ensures that your files remain unchanged when you restore your system to an earlier date. If you need a tool to back up your documents and files please take a look at the excellent BackInTime application which is more configurable and provides options for saving user files.

GitHub - linuxmint/timeshift: System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.

I know some have trouble seeing the difference. I also know you can still use it as a backup utility if you know what you’re doing.

However why would you mix up your data and your system (OS) backups?

It’s best to use the software as it was intended. Use a system restore utility to backup and restore your system - and a backup utility to backup and restore your data. They are tailored to the use case, and keeping each type of backup separate is sensible.

Of course it’s your computer and you can do whatever you want. :man_shrugging:

Would you prefer more people telling you the same things over and over again?

5 Likes

As has been explained many times, Timeshift is not ideal for backup purposes, especially given that you wish to exclude directories, ad hoc.

However, what will work is to create a script to compress (tar or even 7zip if you wish) your entire ~/ directory.

Being a self-created script, you are able to exclude any directories you like – I’d recommend one especially important directory to exclude; the directory that will hold the archive file itself.

Create a directory (either via scripting or manually) and name it whatever you like; example ~/myhome; this is the first directory to be excluded, as it will hold your archived data.

In your script, include everything except;

  • ~/myhome
  • ~/.cache

When finished, move the archive file to your preferred location.

I’ll note that you could backup directly to your preferred location instead, however, scripting the backup in this manner allows you to avoid possible permission and other issues.

I suspect that either the . is interpreted as a sort of pattern (not exactly as regex would) or the setting is overridden by some obscure default setting - obscure in the sense that Timeshift uses defaults (it doesn’t show in its GUI) in addition to user specific settings. ¹⁾
I stumbled over this one while preparing a (bash-)script that should take care of handling the different backup scenarios (system, user1, user2, …, workspace-data) in separated sets of snapshots. Since it’s going to work on ext-fs (no subvols), by renaming, mv, the directory for the set to be activated to timeshift (and re-renaming it to ts4system, ts4user… after the job’s done).

While I have difficulties …

… interactively without a cheat sheet on the other system while I’m in a TTY or in another window while using a terminal emulator (because I forget most commands and their syntax), which makes it rather unconvenient …
… I’ve ever liked scripting with the possibility to test and debug and launching it from a desktop entry with a corresponding (context) menu for actions, objects, and options.

·

The goal’s never been to include home with the system snapshot but to back it up in a separat set of its own (anything excluded but home - without certain directories, e.g .cache).¹⁾ (cp. above)

¹) If that’s indeed impossible it would make the whole approach more questionable.

And yes, I’ll have that 2nd look into backintime. But before that, I’ll have to solve the real issue with my laptop (cp. post 16).

Personally I did use it as a backup utility for years. I only stopped using it (after ignoring the advice of many like yourself) after it failed to restore snapshots…

Basically, Timeshift is designed, and best used, to put snapshots on your system drive. Using BTRFS it works differently, but you can also export those snapshots (i.e. backup the system off disk).

Snapshots aren’t really designed for that - they’re designed to be a time machine for the system. If you restore your system, do you think that any work you did on your files and documents should disappear and be replaced with older files and documents?

Backups will protect you when you edit your .config files and mess them up.

Snapshots will protect you when you get a corrupted system or an errant application that breaks the OS.

So yes, the ‘truthful’ answer is that you can obviously misuse Timeshift, use rsync and include /home.

Every time a snapshot is taken, it will copy ALL the changed files in /home (so it’s a huge task if you have videos, VM’s or whatever) and create massive amounts of disk space. It does not deduplicate.

So if anything goes wrong, you are also looking at losing not only your system, but also your data and snapshots.

It has no ability to backup to network drives (NAS) or cloud - Borg or Restic would do that beter.

As mentioned before - restoring a single file from a timeshift snapshot just isn’t as easy as with backup tools designed to do just that.

I already mentioned this - why I stopped using Timeshift as a backup tool.

https://forums.linuxmint.com/viewtopic.php?t=409967

2 Likes

Sounds like you’re making things more complicated than they have to be - and that’s coming from someone who made their own backup utility (I like making things too, when I feel like it).

There’s no need to partially reinvent the wheel to work around an improper use of software, especially not when there are so many better suited alternatives.

Just backup the system with timeshift. Then use a backup utility to schedule backups of everything else, different things can be backed up separately (no need for a script to rename things before and after).

:man_shrugging:

3 Likes

Since there haven’t been any news after my last post, I now have (good) news (actually ~ 4 hrs old, but I needed some time to recover physically):
I restarted the laptop (for which there was no other way to get out of its freeze but the power button) and logged into another user (which I knew wouldn’t have the freezing issue) in order to prepare the inxi output for a new topic to ask how to get to the part of the journal which might show the reason for the freeze. And while being there it showed that a few single updates were pending. So I let it update, rebooted and logged into my main user to possibly be better prepared to describe the expected freeze after 2-3 seconds. But the freeze was gone!
So I let Timeshift make its pure system backup (with some more exclusions that posts herein pointed me to) and the system’s now ready for installing backintime. From its description to which its GitHub page led me, it looks rather similar to Timeshift in terms of basic mechanism, options and the like.

One question remains open:
There are 2 parts of it each in the (extra) repository, AUR, and AUR-git with partly different naming.
Is the "backintime" of the repository the "backintime-cli" version of the AUR and "backintime-qt" "backintime" respectively (but for the newer AUR version)?

1 Like

Always use the repo version if possible.

2 Likes

Yes, backintime is the CLI and backintime-qt is the GUI.

1 Like

Note that backintime-qt is listed as an optional dependency of backintime

Installing backintime will not automatically install backintime-qt, but installing backintime-qt will also install backintime. :eyes:

sudo pacman -S backintime-qt
3 Likes

Great, I want to have both. Thanks for clarifying!
Might take an hour or 2 (real life demands).

Edit: Takes longer, hopefully solvable

Installation of backintime via pacman demanded reboot.
But that now lets the laptop freeze when logging into my main user more consequently than ever:
After 2-3 seconds (mouse cursor visible and movable) the clock stops dead and the system doesn’t respond to clicks or key strokes. Only means to get out of this is the (physical) power button. (I never got REISUB to work on that keyboard.)

I can still log into another user - so the issue is related to a corrupt configuration.

This has happened occasionally in the past.
But now it changed from occasionally to consequently and other than on earlier occasions, I don’t find the trigger or cure.

I think (hope) that grabbing the relevant part of the system journal could reveal what’s going wrong …
… but I don’t know the exact commands, syntax, an procedure.
As for the latter I might have to set up something, log into my main user …
… and then I’ll have to press the power button to proceed …:unamused_face:

Edit (> 10 trials, ~ 8 hrs, and 3 hrs system sleep later):
This system’s really having me on: the freeze suddenly doesn’t occur anymore!

… digging into backintime’s setup …

Abandoned Topic (30+ days)