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.67k stars 282 forks source link

Scheduled snapshots not working #135

Open bittorrenter opened 6 years ago

bittorrenter commented 6 years ago

Hi, The program is a lifesaver, well strictly speaking, a sanity saver.

Unfortunately timeshift (Linux Mint 18.3) is not taking scheduled snapshots - manual backups are working just fine and restore easily. A different machine (Linux Mint 18.1) is taking scheduled snapshots

Regards,

PS there's at least another cup of coffee coming if you can sort this out

teejee2008 commented 6 years ago

Issue is not with Mint 18.3. You need to investigate why it's broken on your system. Some things to check: 1) File timeshift-hourly should be present in /etc/cron.d/ with permissions 0644 and owner as "root". 2) Check if cron is installed and working 3) Check for error messages in system log (/var/log/syslog). Search for "cron" in the file and you will be able to see any messages reported by cron when it executed the task.

teejee2008 commented 6 years ago

Is your system headless? (without a display server installed)

gmish27 commented 5 years ago
3\. Check for error messages in system log (/var/log/syslog)

@teejee2008 I have found below entry in my timshift log (the program isn't creating any scheduled monthly snapshots for me):

[23:00:02] crontab -l
[23:00:02] Failed to read cron tab
[23:00:02] crontab -l
[23:00:02] Failed to read cron tab
[23:00:02] Cron task exists: /etc/cron.d/timeshift-hourly
thebiggestmac commented 4 years ago

Ubuntu 18.04, headless. The same. Cron backups do not work.

[09:00:01] loading snapshots from '/run/timeshift/backup/timeshift/snapshots': 6 found [09:00:01] exit_app() [09:00:01] crontab -l [09:00:01] Failed to read cron tab [09:00:01] crontab -l [09:00:01] Failed to read cron tab [09:00:01] Cron task exists: /etc/cron.d/timeshift-hourly [09:00:01] unmount_target_device() [09:00:01] clean_logs() [09:00:01] rm -rf '/tmp/bJAput9y'

root@tpad:/etc/cron.d# ls -la /etc/cron.d/timeshift-hourly -rw-r--r-- 1 root root 137 Jan 25 17:40 /etc/cron.d/timeshift-hourly root@tpad:/etc/cron.d# root@tpad:/etc/cron.d# cat /etc/cron.d/timeshift-hourly SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin MAILTO=""

0 root timeshift --check --scripted root@tpad:/etc/cron.d#

thebiggestmac commented 4 years ago

Honestly, I now don't use timeshift anymore and think it is absolutely useless for me. It does nothing above standard rsync, is buggy, consumes disk space. Switched to rsync and zfs replication where available.