How (and specifically from where) to prune Timeshift backups of large unwanted items (e.g., 400GB Steam folders)?

As Timeshift (which is the only reason I can still use Arch with my limited expertise) doesn’t allow you to specify folders or subvolumes to exclude, I run into the problem of an 80GB Steam download effectively becoming 160GB or so once it’s backed up. I can always re-download a game, but this double-whammy of disk usage is becoming untenable. I am using BTRFS Timeshift.

Therefore, I would like to go into the (on my system) /run/timeshift/backup/@home/<user>/.local/share/Steam folder and remove some things.

So, here are my questions:

…A) If I were to go into said timeshifts backup folder (i.e., not the individual snapshots folder) and delete the several hundred GB of games in there, what would be the effect?
…A.1) Were I to restore, would my backups still restore the rest of my system, excluding Steam (that is, leaving it alone, OR: )?
…A.2) Would it cause some sort of journaling crisis and result in the deletion of my active Steam folder upon a restore?
…A.3) Is this even the right location, or should it be from the individual snapshots (e.g., timeshift/backup/timeshift-btrfs/snapshots/2021-07-18_18-00-01/@home/<user>/.local/share/Steam?
…B) Following up on A.3, can anyone explain the process Timeshift uses on BTRFS, such that I can feel comfortable in pruning these backups?

Doing a ‘du’ shows that both locations (i.e., timeshift/backup/@home vs timeshift/backup/timeshift-btrfs/snapshots/<timestamp>/@home…) contain the same files, of the same size. I’m not sure what kind of black-magic directory linking is going on, considering all the duplication, but then again, I’m far from competent in knowledge vis-a-vis BTRFS and Timeshift, so here we are.

I would be very appreciative for someone to answer the above questions and clear up for me the process of pruning things that should not be backed up. Otherwise, 1TB sort of becomes 500GB with Timeshift-BTRFS. Thank you!

PS: Excluding @home altogether in the settings isn’t an option, as being able to restore borked user profile dotfiles, etc., is one of the main reasons I’m using Timeshift.

What are you talking about? Timeshift specifically does that. In the Settings, open them.
Also are you an Arch user posting on Manjaro forum?

For “A/B” questions, you don’t do that, don’t manually mess with the Timeshift backup files, Timeshift is the tool to use to manage your backups. Open TimeShift and click the buttons…

The problem here is that you went against TimeShift warning telling you TimeShift is not made to backup your home folder (and by default it excludes the /home and /root folders). Technically you can do that, but there are multiple reasons you don’t do that, for example, user folder usually contains gigantic files (movies, games, and so on), files you usually don’t want to backup, also restoring a backup would has as consequence overwrite your current /home folder files, which you probably don’t want, imagine you worked on documents, have an issue, restore a backup and all your work is gone because it restored the home folder as it was when you made the backup you restored… files could go back in time or just disappear completely. You don’t want that. timeshift/README.md at master · teejee2008/timeshift · GitHub

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.

You can selectively include items for backup from the Settings window. Selecting the option “Include hidden items” from the Users tab will backup and restore the .hidden files and directories in your home folder. These folders contain user-specific config files and can be included in snapshots if required.

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

Basically open TimeShift, configure it properly, and use it to manage your backups (create/restore/delete and include/exclude/filter folder and files).

2 Likes