Trying (and failing) to setup Timeshift. Hoping to have it do snapshots of an ext4 LUKS-encrypted Arch system partition.

Documentation is thin on the ground and relates heavily to the GUI so problem solving hasn’t been easy.

This is what I get when I run it for the first time:

$ sudo timeshift --create --comments "initial snapshot" First run mode (config file not found) Selected default snapshot type: RSYNC Mounted '/dev/dm-0 (nvme0n1pX)' at '/run/timeshift/991/backup' ------------------------------------------------------------------- Estimating system size... Creating new snapshot...(RSYNC) Saving to device: /dev/dm-0, mounted at path: /run/timeshift/991/backup Syncing files with rsync... E: rsync returned an error                                             E: Failed to create new snapshot Failed to create snapshot ------------------------------------------------------------------- Removing snapshots (incomplete): ------------------------------------------------------------------- Removing '2025-11-07_10-30-22'... Removed '2025-11-07_10-30-22'                                          ------------------------------------------------------------------- E: Failed to remove directory Ret=256

I initially left timeshift.json empty except for ‘backup_device’, but this is how it filled it out:

{  "backup_device_uuid" : "ab13bb9a-e4d6-4884-b8c8-XXXXXXXX",   "parent_device_uuid" : "904be7d0-a38d-4aed-9ee4-XXXXXXXX",   "do_first_run" : "false", "btrfs_mode" : "false",   "include_btrfs_home_for_backup" : "false",   "include_btrfs_home_for_restore" : "false",   "stop_cron_emails" : "true", "schedule_monthly" : "false", "schedule_weekly" : "false", "schedule_daily" : "false", "schedule_hourly" : "false", "schedule_boot" : "false", "count_monthly" : "2", "count_weekly" : "3", "count_daily" : "5", "count_hourly" : "6", "count_boot" : "5", "date_format" : "%Y-%m-%d %H:%M:%S", "exclude" : [ "/root/","/home/joe/" ], "exclude-apps" : [] }

I believe that unless you tell it otherwise, it will write snapshots to the same partition, which is what I want. ‘parent_device’ appears to be the LUKS crypto container that the root sits in.

Anyone spot the problem? Any help would be much appreciated!

Also, if I wanted to exclude a dir (inc. all subdirs & contents) at root called ‘blah’, would “/blah/**” be the correct exclude pattern?

  • BananaTrifleViolin@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    4 hours ago

    Looking at your error it’s because Rsync is erroring.

    I’d starr by testing Rsync with an individual text file saving to /dev/dm-0 and see what error is returned.

    Timeshift is good but it basically is just a tool to use Rsync to save a copy of your system folders (or other folders if you wish).

    Rsync needs to be able to read the source and write to the destination, so I’d start with testing that Rsync is able to do that.

    Given you’re using an encrypted partition it’s possible you’re trying to read/write to the wrong locations. You’ve provided device UUIDs but you’d probably actually need to be backing up the mounted decrypted locations? I.e. the root file system / will actually be a mounted location in your Linux set up, probably under /run, with symlinka pointing to it for all the different system folder. Similar for /home/ if you want to back up personal files.

    The device UUID would point to the filesystem containing the encrypted file (managed by LUKS) which will have very limited read/write permissions, rather than directly to the decryoted contents / or /home partitions as you’d expect in a normal system. In particular if /dev/dm-0 (looks to be an nvme drive) is an encrypted destination then really you also want to be pointing directly to it’s decrypted mounted location to write your files into, not the whole device.

    Edit: think of it like this, you don’t want to back up the encrypted container with Timeshift, you want to back up the decryoted contents (your filesystem) into amother location in your filesystem (encrypted or decrypted). If the destination is also an encrypted location you need to back up into its file system, not the device where the encrypted file sits. So use more specific filesystem paths not UUIDs. That would be something like /mnt/folder or /run/folder not /dev/anything as that’s hardware location, and not directly mounted in an encrypted filesystem unlike how it can be in a non-encryoted system.