Timeshift saving sparse files (100 GB)

Hello! I went to create my first Timeshift snapshot but it was taking an incredibly long time, around an hour and I cancelled it. I cancelled it because I realized I have some sparse files for my virtual machine images (they are occupying a few GBs but if copied incorrectly it will occupy the entire 100 GB for those images and I have less than 256 GB on my hard drive).

I want to know if Timeshift will manage sparse files for KVM images correctly? Meaning it will remain resizeable and won’t take up the 100 GB for every image? Is that likely why it was taking so long to create the snapshot?

I have no idea if Timeshift handles sparse files correctly or not (I would hope so), but do bear in mind that it’s not a general purpose backup application, it’s specifically designed as an OS-rollback tool;

Timeshift is designed to protect system files and settings. It is NOT a backup tool and is not meant to protect user data.

Use something else for user data backup. I like Back In Time but there are many others.


Or make an exception for the vm folder.
Btw, at least the gui shows which file it is currently working on, to test your theory.

btrfs and virtual machine images is a know bad combination - a least in the default setup. Create a separate partition with an ext4 filesystem.

Configure your a new storage for your virtual images an move them to the new filesystem.

virtual machine images on btrfs - sx.nix.dk

Initially, Timeshift creates a complete copy, after which it changes only what has changed, so subsequent ones are smaller. Yes, he takes a very long time to create the first one. What it allows you to do is transfer the system to another device which is very convenient. These are also snapshots that allow you to roll back the snapshot if something happens. A very useful thing if you look into it, it perfectly restores a backup copy in case something goes wrong.

I’m likely only going to update timeshift snapshots before each major update. But what’s the issue with including the user home folder?

Rsync manages this by updating the existing snapshot, correct? I don’t have it scheduled since I want to manually update/sync the snapshot before a major system update, but is that possible considering I’ll manually do this? Only option I can see says “Create” but do you know if this will increment or make a new snapshot?

That would mean to destroy the snapshot and replace it with another one.
Defeats the purpose.

What happens when you discover a few days later that there is an issue and you want to revert the update until it gets fixed? Your user data gets reverted too.

The quote I posted is from the original developer of Timeshift. That’s good enough for me, but if you want to ignore him and use it in a way he didn’t intend then that’s your choice.

1 Like

Oh I was thinking if I reverted I would lose user data. When you revert, do you choose what to revert?

Doesn’t it increment? Because one snapshot took at least 30 minutes for me and my whole system would become extremely slow, almost frozen.

Context, my friend.
Not just the one word.

I need to detach myself from this … and leave you be

That’s exactly how i doing it, /home partition included for my Rsync Snapshots.

Just keep in mind, your files in home will replaced.

As far i remember, you can choose the partitions in the GUI which one you want to replace.

But its possible that i can’t 100% remember it correctly, its also possible that the GUI will only inform you, that all this included partition’s will get replaced.

I also think that a default Home folder (not partition) probably don’t show this dialog in the restore menue.

I was playing a little with that restore function 2 years ago… but sadly can’t remember all details.

From your question, it is unclear if the partition you want to timeshift, even is btrfs. Anyways timeshift offers rsync and btrfs-snapshots as alternatives on first setup (via timeshift-gtk gui).
Did you select the option matching your filesystem?
Yes, a first snapshot using rsync can take a looong time. And, for vm images, I would set the C attribute (no copy-on-write) if they reside on the btrfs partition.

1 Like

I used rsync on my ext4 filesystem. I don’t think it asked to select an option for my filesystem. I did include my /home/user partition. My VM images are on my root partition. For now I have excluded the images.

One concern though which I couldn’t get a clear answer for yet: as some users advised not to include /home/user since the data would also revert, is there an option that allows you to choose what to revert? I’m just wondering if I don’t include my /home/user (I don’t have a separate home partition it’s in root as default) that my data would be lost if the whole partition is reverted? Same for my VM images: would they also be lost in a revert?

Look, I do this, from time to time, for example once every 3 months, I create a snapshot via Rsync, the rest of the time I use system snapshots (they are created and replaced automatically before each update). This is more than enough, so it can be easily restored in case of breakdown. But I want to note that Manjaro very rarely breaks down, so this is enough.

I’ll also clarify that I create Rsync on a separate external hard drive, and this allows me to deploy the system on any suitable device, or restore it on this one.

Like you were told, don’t use timeshift for your Home folder, let timeshift handle your System recover insurance.

Beside rsync I recommend you to check out syncthing that allows you to sync all your device on your LAN and version control easily.
Also, for your Personal Data, don’t use ~/
use something like ~/yoel instead, with that you will have a better overview and option to back up files you are controlling.

Also, a Cloud server could be an option…

Please RTFM - https://github.com/linuxmint/timeshift/blob/master/README.md

Which also tells you

Note: It is not recommended to include user data in backups as it will be overwritten when you restore the snapshot.