teejee2008 / 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.
GNU Lesser General Public License v3.0
4.68k stars 281 forks source link

Unable to change snapshot location #832

Open vycoder opened 2 years ago

vycoder commented 2 years ago

I installed timeshift, it set it up first on the default partition, it won't let me set it up on my external drive because it has no subvolume yet. I created a btrfs subvolume, went back to Timeshift UI settings to change it.

But then I realized all my schedules are not showing up on the UI. Only the ones I manually created. I went back to timeshift ui, change the location back to my default system partition, and all the snapshots are generated there.

I tried setting it up via terminal using: sudo timeshift --snapshot-device /dev/sda1

App config loaded: /etc/timeshift/timeshift.json

/dev/sda1 is mounted at: /run/timeshift/backup, options: rw,relatime,ssd,space_cache,subvolid=5,subvol=/

App config saved: /etc/timeshift/timeshift.json

When I do: sudo timeshift --list

/dev/sda1 is mounted at: /run/timeshift/backup, options: rw,relatime,ssd,space_cache,subvolid=5,subvol=/

Device : /dev/sda1
UUID   : 00c902a1-3f74-48f6-bc88-a1f4a2141d0c
Path   : /run/timeshift/backup
Mode   : BTRFS
Status : OK

Everything looks good so far, until I generate a new snapshot: sudo timeshift --create

Using system disk as snapshot device for creating snapshots in BTRFS mode
Mounted '/dev/nvme0n1p2' at '/run/timeshift/backup'
Creating new backup...(BTRFS)
Saving to device: /dev/nvme0n1p2, mounted at path: /run/timeshift/backup
Created directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-11-10_08-50-33
Created subvolume snapshot: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-11-10_08-50-33/@
Created control file: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-11-10_08-50-33/info.json
BTRFS Snapshot saved successfully (0s)
Tagged snapshot '2021-11-10_08-50-33': ondemand
------------------------------------------------------------------------------

Checking the UI again will show the newly created snapshot only when I change the settings back to point to the default system partition. I disabled it for now until I figure it out.

Anyone also encountered the same issue?

System:

simone-viozzi commented 2 years ago

With btrfs mode, timeshift use the snapshot capability of the btrfs file system so it will always be on the same drive. If you want the snapshot to be saved in another drive, you need to use the rsync mode.

The best combo on btrfs is: