1

I really like timeshift for backup and restore because it's simple, works well, and I can store the backup locally. I have not been able to get it to work on a pi though. When installed from apt this I get this error when I try to make a backup:

sudo timeshift  --create --comments "init" --debug
D: Main()
D:
D: Running Timeshift v19.01
D:
D: Session log file: /var/log/timeshift/2021-10-25_06-03-26_ondemand.log
D: Distribution: raspbian "10"
D: DIST_ID: raspbian
D: Main: check_dependencies()
D: Main: add_default_exclude_entries()
D: Main: add_default_exclude_entries(): exit
D: update_partitions()
D: df -T -B1
D: Device: get_disk_space_using_df(): 1
D: Device: get_mounted_filesystems_using_mtab(): 1
D: Device: get_filesystems(): 5
D: partition list updated
D: detect_system_devices()
D: /boot is mapped to device: /dev/mmcblk0p1, UUID=5DE4-665C
D: / is mapped to device: /dev/mmcblk0p2, UUID=7295bbc3-bbc2-4267-9fa0-099e10ef5bf0
D: Searching subvolume for system at path: /
D: Users: root pi
D: Encrypted home users:
D: Encrypted home dirs:

D: Encrypted private dirs:

D: Main: load_app_config() App config loaded: /etc/timeshift.json D: IconManager: init() D: bin_path: /usr/bin/timeshift D: found images directory: /usr/share/timeshift/images D: Main(): ok D: AppConsole: parse_arguments() D: Main: initialize_repo() D: backup_uuid= D: backup_parent_uuid= D: Setting snapshot device from config file D: Main: initialize_repo(): exit D: AppConsole: start_application()

Select backup device:

Num Device Size Type Label

0 > /dev/mmcblk0p2 31.7 GB ext4 rootfs

Enter device name or number (a=Abort): ^[[A E: Invalid input Enter device name or number (a=Abort): 0

D: SnapshotRepo: from_device(): RSYNC D: SnapshotRepo: init_from_device() D: D: SnapshotRepo: unlock_and_mount_devices() D: device=/dev/mmcblk0p2 D: SnapshotRepo: unlock_and_mount_device() D: device=/dev/mmcblk0p2 D: Device: get_mounted_filesystems_using_mtab(): 1 D: udisksctl mount -b '/dev/mmcblk0p2' Error mounting /dev/mmcblk0p2: GDBus.Error:org.freedesktop.UDisks2.Error.AlreadyMounted: Device /dev/mmcblk0p2 is already mounted at `/'.

D: Device: get_mounted_filesystems_using_mtab(): 1 D: Selected snapshot device: /dev/mmcblk0p2 D: Free space: 0 B D: SnapshotRepo: check_status() D: SnapshotRepo: available() D: is_available: ok D: SnapshotRepo: has_snapshots() D: SnapshotRepo: has_space() D: df -T -B1 '/dev/mmcblk0p2' D: Device: get_disk_space_using_df(): 0 D: no snapshots D: SnapshotRepo: check_status(): exit D: SnapshotRepo: init_from_device(): exit D: SnapshotRepo: available() D: is_available: ok D: Main: create_snapshot() D: SnapshotRepo: has_space() D: df -T -B1 '/dev/mmcblk0p2' D: Device: get_disk_space_using_df(): 0 D: no snapshots E: Not enough disk space (< 1.4 GB) E: Select another device or free up some space

D: SnapshotRepo: auto_remove() D: SnapshotRepo: remove_untagged() D: SnapshotRepo: load_snapshots() D: loading snapshots from 'timeshift/snapshots': 0 found D: SnapshotRepo: load_snapshots() D: loading snapshots from 'timeshift/snapshots': 0 found D: SnapshotRepo: load_snapshots() D: loading snapshots from 'timeshift/snapshots': 0 found D: SnapshotRepo: has_space() D: df -T -B1 '/dev/mmcblk0p2' D: Device: get_disk_space_using_df(): 0 D: no snapshots E: Not enough disk space (< 1.4 GB) E: Select another device or free up some space

D: exit_app() D: crontab -l D: Failed to read cron tab D: crontab -l D: Failed to read cron tab D: unmount_target_device() D: clean_logs() D: rm -rf '/tmp/2ol7sJPh'

if it helps, the output of df -T -B1 '/dev/mmcblk0p2' is

Filesystem     Type     1B-blocks  Used Available Use% Mounted on
devtmpfs       devtmpfs 450473984     0 450473984   0% /dev

I'd like to figure out how to get timeshift to work, but suggestions for a similar alternative are also welcome.

bob mcgrath
  • 59
  • 1
  • 7

4 Answers4

1

You're not the first one to report issues with timeshift on RPi. I don't use it, so I can't help you troubleshoot. However, since you indicated you might be open to another solution, I'll recommend image-backup. See this answer for more information.

Seamus
  • 23,558
  • 5
  • 42
  • 83
1

Your immediate problem seems to be that you don't have udisksctl properly installed, which is quite surprising. Try running it from the command line and if it won't run, (re)install the udisks2 package.

If you made wild experiments on your system (renaming key system directories like /usr/bin, removing random files from such places, changing $PATH, /etc/ld.so.conf and the like) I suggest you reinstall your system.

Also note that timeshift doesn't make proper backups by default, it creates snapshots of your system which you can restore to roll back unwanted changes. This will help if your system stops working properly after an upgrade. However, if your SD card fails, the snapshots will be gone as well.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
0

I use timeshift on my Linux PCs and it works great, but I use a simpler (IMHO) system backup solution on my Pies: rpi-clone run daily from crontab to maintain a uSD card image on a USB stick.

Restore the USB stick with a simple dd copy of the USB stick directly to the uSD card (or a new one, if the original uSD card failed) and a reboot.

Obtain rpi-clone via git:

    $ git clone https://github.com/billw2/rpi-clone.git
    $ cd rpi-clone
    $ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

Just my $0.02...

0

The solution I have settled on is using a proper embedded linux distro like yocto or buildroot along with an ota update system like swupdate, mender, or rauc. This is arguably quite a lot more robust than timesync because it can revert itself if an update fails.

bob mcgrath
  • 59
  • 1
  • 7