Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to eyeball08,Wondergirly,bofh,johnstevens77,Bhoddhisatva, for Donating to support the site

timeshift and linux backups

Seek assistance with all types of tech. - computer, phone, TV, heating controls etc.
cinelli
Lemon Slice
Posts: 553
Joined: November 9th, 2016, 11:33 am
Has thanked: 234 times
Been thanked: 161 times

timeshift and linux backups

#328930

Postby cinelli » July 27th, 2020, 11:34 am

Does any linux user here use timeshift? It is advertised as being an equivalent to Windows’ creation of restore points, namely if you have made a change to your OS and things stop working, you can go back in time to the point where they did work. I have been experimenting with timeshift in the last fortnight or so and am mystified how it works and wonder if it is reliable.

If you switch it on and accept all the defaults, a system “snapshot” is taken every day and five snapshots are kept on a rolling basis. But there is no manual page for timeshift and no indication when these daily snapshots are taken. In my linux Mint 18.3 cinnamon system I currently have four snapshots. The two on 22 and 23 July are timed at 15:00 and those of 25 and 26 July 10:01. There isn’t one for 24 July and it hasn’t done one today yet. But yesterday a snapshot of 21 July existed and timeshift took it in its head to delete it. Mysterious. I don’t have my computer on all hours but it is usually switched on between about 10:00 and 18:00. But if timing is hazy for daily snapshots, what about those for weekly snapshots? On which day do they happen?

Although timeshift can save user files, by default only system files are saved. Timeshift is advertised as not being a backup system. Which brings me to the question, which software do you use for backups? I myself have used dump and restore from the command line because these are the commands I learned years ago. These allow for incremental dumps which means you can do a full level 0 dump. Then maybe the next day, a level 1 dump will save just those files created or changed in the last day. And so on. But I wonder if there is anything better in 2020. Thanks for your advice.

Cinelli

Urbandreamer
Lemon Quarter
Posts: 3183
Joined: December 7th, 2016, 9:09 pm
Has thanked: 357 times
Been thanked: 1047 times

Re: timeshift and linux backups

#328936

Postby Urbandreamer » July 27th, 2020, 11:58 am

cinelli wrote:Which brings me to the question, which software do you use for backups? I myself have used dump and restore from the command line because these are the commands I learned years ago. These allow for incremental dumps which means you can do a full level 0 dump. Then maybe the next day, a level 1 dump will save just those files created or changed in the last day. And so on. But I wonder if there is anything better in 2020. Thanks for your advice.

Cinelli


I only backup data. My theory is that if the OS goes down, I'll simply replace it.
I use rsync for that and infrequently manually run a script to backup to a NAS. A symilar script is run by cron on a mirror.

It would be irritating to lose a months worth of spreadsheet entries or downloaded ebooks, hardly the end of the world.

I think that I enabled timeshift. More in case it had any advantages than that I had a good reason. HOWEVER I can think of quite a good reason.

I understand that if you game on a Linux PC then it's quite a good idea to run a custom or tweaked kernal. I don't need to for what I want. Timeshift could help if your latest tweak causes issues.

UncleEbenezer
The full Lemon
Posts: 10789
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1470 times
Been thanked: 2997 times

Re: timeshift and linux backups

#328937

Postby UncleEbenezer » July 27th, 2020, 12:04 pm

I haven't followed the links, but does this help?

I'm down to an ad-hoc three-pronged approach:

- Most stuff can be reinstalled from standard in a worst-case, and doesn't get backed up.
- All ${work}-ish stuff that matters is under version control (like svn or git), with a master repository elsewhere.
- Personal stuff is within what I can occasionally snapshot into a tarball and keep elsewhere.

I probably should be more systematic, but it works. And in defence of the tarball, tar is after all our legacy of the original backup!

Infrasonic
Lemon Quarter
Posts: 4485
Joined: November 4th, 2016, 2:25 pm
Has thanked: 647 times
Been thanked: 1264 times

Re: timeshift and linux backups

#328977

Postby Infrasonic » July 27th, 2020, 2:34 pm

Rsync has a GUI if needed, and Rclone offers a cloud backup facility (again there is also a GUI if preferred).
https://sourceforge.net/projects/grsync/
https://rclone.org/opendrive/
https://rclone.org/gui/

I've got both GUI's on my Debian 10 Crostini container on my Chromebook, but I've not really explored them yet in any depth.

cinelli
Lemon Slice
Posts: 553
Joined: November 9th, 2016, 11:33 am
Has thanked: 234 times
Been thanked: 161 times

Re: timeshift and linux backups

#329157

Postby cinelli » July 28th, 2020, 10:59 am

Thank you. I notice there is another backup utility called backintime. This seems to be a GUI for rsync. If I have understood correctly, rsync copies files and directory structures whereas the dump command creates a single, potentially huge, file.

Cinelli

Infrasonic
Lemon Quarter
Posts: 4485
Joined: November 4th, 2016, 2:25 pm
Has thanked: 647 times
Been thanked: 1264 times

Re: timeshift and linux backups

#329162

Postby Infrasonic » July 28th, 2020, 11:18 am

https://en.wikipedia.org/wiki/Back_in_T ... x_software)

From a Google search, a comparison of various Linux back up software options, although it is two years old so may not be completely up to date (or 100% accurate, as ever DYOR).

https://linuxhint.com/11_best_backup_tools_linux/
...In the case of Linux systems, there are a number of available backup solutions that offer professional grade support and performance.

These tools are essentially software that make a copy of important files in a safer place. There are numerous scenarios where such a tool can save the day. For example, whenever you are upgrading your system or installing a major component, things are too easy to go wrong. In that case, a system backup would save you from any problem.

Here are some of the best backup tools for Linux...
Cont.

formoverfunction
Lemon Slice
Posts: 344
Joined: June 12th, 2018, 9:27 pm
Has thanked: 88 times
Been thanked: 126 times

Re: timeshift and linux backups

#329338

Postby formoverfunction » July 29th, 2020, 8:36 am

I back up my Home directory on boot. I copy "Home" to a 2nd SSD (second device) that I use for a "Time Machine". Different partition.

The "Time Machine" is the back up for me OSX Macbook Pro. Hourly backups.

Once a week I then back up the whole system to a removeable hard drive and the same for the Mac.

So I have:

For the Macbook Pro a "Time Machine" (shared as a backup device with my Debian Home directory) and iCloud of my Documents, Desktop etc. and portable SSD copy.

For my Debian box I back up my Home Directory daily and whole system weekly, portable SSD.

I use the MacBook and Debian box in tandem, I find I use ssh all throught the day, tmux and "mount' my Debain "Home" manually in the mornings on my Macbook. That's one of the great things about using OSX with Linux. In my experience.

I think for Apple users a Rasberry Pi, at least, is a great little invesment. You can use it for a bluetooth audio player/podcast catcher/RSS reader/file server/back up device and general little work horse.....all for same price as a couple of cables from Apple and it's so easy to manange.

I have one connected to a scrounged monitor and use it to read PDF's, play podcasts and tmux/guake for RSS(via newsboat)/RNS(via links2)/Twitter (via rainbowstream), I think of it as my £55 Bloomberg terminal! Very handy for investors!

tsr2
2 Lemon pips
Posts: 227
Joined: June 20th, 2017, 8:30 am
Has thanked: 294 times
Been thanked: 62 times

Re: timeshift and linux backups

#329459

Postby tsr2 » July 29th, 2020, 3:50 pm

cinelli wrote:If you switch it on and accept all the defaults, a system “snapshot” is taken every day and five snapshots are kept on a rolling basis. But there is no manual page for timeshift and no indication when these daily snapshots are taken. In my linux Mint 18.3 cinnamon system I currently have four snapshots. The two on 22 and 23 July are timed at 15:00 and those of 25 and 26 July 10:01. There isn’t one for 24 July and it hasn’t done one today yet. But yesterday a snapshot of 21 July existed and timeshift took it in its head to delete it. Mysterious. I don’t have my computer on all hours but it is usually switched on between about 10:00 and 18:00. But if timing is hazy for daily snapshots, what about those for weekly snapshots? On which day do they happen?


If you look at the settings, I suspect the deletions will be less mysterious. It has settings for hourly, daily, weekly, monthly and boot time snapshots and you can set how may of each you keep. My current settings are to keep 2 monthly snapshots and 3 weekly snapshots, I don't take hourly, daily or boot time snapshots. I don't see anything to control precise times.

GeoffF100
Lemon Quarter
Posts: 4746
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: timeshift and linux backups

#329826

Postby GeoffF100 » July 30th, 2020, 8:12 pm

I have had a look on the web. Deja Dup seems to be an admirably simple program for doing incremental backups of user files. Restoring individual files is built into Nautilus by default on Ubuntu. It is possible to achieve the same outcome by setting up a custom action in Thunar:

https://www.linuxliteos.com/forums/tuto ... in-thunar/

I do not think that is possible in PCManFM-Qt.

ReformedCharacter
Lemon Quarter
Posts: 3134
Joined: November 4th, 2016, 11:12 am
Has thanked: 3633 times
Been thanked: 1519 times

Re: timeshift and linux backups

#329830

Postby ReformedCharacter » July 30th, 2020, 8:40 pm

I dual-boot Linux and Windows and find Macrium Reflect very useful for backing up Linux partitions too.

https://blog.macrium.com/cloning-and-im ... bffeaf6307

RC

Infrasonic
Lemon Quarter
Posts: 4485
Joined: November 4th, 2016, 2:25 pm
Has thanked: 647 times
Been thanked: 1264 times

Re: timeshift and linux backups

#329841

Postby Infrasonic » July 30th, 2020, 9:58 pm

ReformedCharacter wrote:I dual-boot Linux and Windows and find Macrium Reflect very useful for backing up Linux partitions too.

https://blog.macrium.com/cloning-and-im ... bffeaf6307

RC


One small gotcha to be aware of...https://forum.macrium.com/33621/RE-Cant ... disk#33627

Hi

Thanks for posting.
I'm afraid that Linux partitions cannot be shrunk during a restore or clone operation. Only shrinking of NTFS & FAT32/16 is permitted.

Kind Regards

Nick - Macrium Support

JohnB
Lemon Quarter
Posts: 2505
Joined: January 15th, 2017, 9:20 am
Has thanked: 690 times
Been thanked: 1005 times

Re: timeshift and linux backups

#329862

Postby JohnB » July 31st, 2020, 12:28 am

I rsync the OS and data partions to a different disk. I later rsync the backup partition to one of 2 external drives, the other is at my brothers house, and we swap ocassionally

All the docs I write are stored in subversion, so I can go back to earlier revisions. I commit every few weeks.

GeoffF100
Lemon Quarter
Posts: 4746
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: timeshift and linux backups

#329886

Postby GeoffF100 » July 31st, 2020, 8:20 am

GeoffF100 wrote:I have had a look on the web. Deja Dup seems to be an admirably simple program for doing incremental backups of user files. Restoring individual files is built into Nautilus by default on Ubuntu. It is possible to achieve the same outcome by setting up a custom action in Thunar:

https://www.linuxliteos.com/forums/tuto ... in-thunar/

I do not think that is possible in PCManFM-Qt.

Here is an easily digestible description of Deja Dup:

http://xubuntugeek.blogspot.com/2012/08 ... buntu.html

cinelli
Lemon Slice
Posts: 553
Joined: November 9th, 2016, 11:33 am
Has thanked: 234 times
Been thanked: 161 times

Re: timeshift and linux backups

#330632

Postby cinelli » August 3rd, 2020, 5:38 pm

I understand a bit more about how timeshift works. As previously reported I am running linux Mint 19.3 and have timeshift running, accepting all the defaults. This means a snapshot is taken once a day and five are kept on a rolling basis. By default only system files are saved. User files can be saved but this system is not considered to be a reliable backup system. A script is run every hour on the hour. So first the oldest snapshot is deleted. Then rsync is run to save any files which have been created or changed since yesterday. Having taken a snapshot the bespoke script, created in /tmp, continues to be run every hour, presumably checking whether a snapshot has already been made earlier in the day. Logs of all these attempts are saved in /var/log/timeshift. If I display my snapshots, the directories appear as follows:

cinelli@asus-mint:~$ ls -l /home/timeshift/snapshots
total 20
drwxr-xr-x 3 root root 4096 Jul 29 16:01 2020-07-29_16-00-02
drwxr-xr-x 3 root root 4096 Jul 30 16:00 2020-07-30_16-00-01
drwxr-xr-x 3 root root 4096 Aug 1 11:01 2020-08-01_11-00-01
drwxr-xr-x 3 root root 4096 Aug 2 11:00 2020-08-02_11-00-01
drwxr-xr-x 3 root root 4096 Aug 3 11:01 2020-08-03_11-00-01

But there is no good reason why 31 July is missing. In addition I have found that sometimes there are only four snapshots which makes me think that the oldest has been deleted and the attempt to create a new one has failed. Perhaps timeshift is not entirely reliable.

And now I have a conundrum to which I just do not have a answer. If I ask how much space each of these snapshots is taking, I find the following:

cinelli@asus-mint:/home/timeshift/snapshots$ sudo du -hs *
13G 2020-07-29_16-00-02
347M 2020-07-30_16-00-01
485M 2020-08-01_11-00-01
382M 2020-08-02_11-00-01
364M 2020-08-03_11-00-01

I think of the oldest directory as “owning” the files and the others as being full of links, so taking up less space. But if I select just one I get a different answer:

cinelli@asus-mint:/home/timeshift/snapshots$ sudo du -hs 2020-07-30_16-00-01
13G 2020-07-30_16-00-01

Can anyone offer an explanation? Thanks.

Cinelli

kyu66
2 Lemon pips
Posts: 248
Joined: November 14th, 2016, 5:14 pm
Has thanked: 2 times
Been thanked: 131 times

Re: timeshift and linux backups

#330638

Postby kyu66 » August 3rd, 2020, 5:58 pm

cinelli wrote:I understand a bit more about how timeshift works. As previously reported I am running linux Mint 19.3 and have timeshift running, accepting all the defaults. This means a snapshot is taken once a day and five are kept on a rolling basis. By default only system files are saved. User files can be saved but this system is not considered to be a reliable backup system. A script is run every hour on the hour. So first the oldest snapshot is deleted. Then rsync is run to save any files which have been created or changed since yesterday. Having taken a snapshot the bespoke script, created in /tmp, continues to be run every hour, presumably checking whether a snapshot has already been made earlier in the day. Logs of all these attempts are saved in /var/log/timeshift. If I display my snapshots, the directories appear as follows:

cinelli@asus-mint:~$ ls -l /home/timeshift/snapshots
total 20
drwxr-xr-x 3 root root 4096 Jul 29 16:01 2020-07-29_16-00-02
drwxr-xr-x 3 root root 4096 Jul 30 16:00 2020-07-30_16-00-01
drwxr-xr-x 3 root root 4096 Aug 1 11:01 2020-08-01_11-00-01
drwxr-xr-x 3 root root 4096 Aug 2 11:00 2020-08-02_11-00-01
drwxr-xr-x 3 root root 4096 Aug 3 11:01 2020-08-03_11-00-01

But there is no good reason why 31 July is missing. In addition I have found that sometimes there are only four snapshots which makes me think that the oldest has been deleted and the attempt to create a new one has failed. Perhaps timeshift is not entirely reliable.

And now I have a conundrum to which I just do not have a answer. If I ask how much space each of these snapshots is taking, I find the following:

cinelli@asus-mint:/home/timeshift/snapshots$ sudo du -hs *
13G 2020-07-29_16-00-02
347M 2020-07-30_16-00-01
485M 2020-08-01_11-00-01
382M 2020-08-02_11-00-01
364M 2020-08-03_11-00-01

I think of the oldest directory as “owning” the files and the others as being full of links, so taking up less space. But if I select just one I get a different answer:

cinelli@asus-mint:/home/timeshift/snapshots$ sudo du -hs 2020-07-30_16-00-01
13G 2020-07-30_16-00-01

Can anyone offer an explanation? Thanks.

Cinelli


You are correct in that hard links are used and it is down to how du interprets them when reporting disk usage. A full explanation is given here - the original question is almost identical to yours :-)

https://stackoverflow.com/questions/199 ... s-filesize

kyu66

GeoffF100
Lemon Quarter
Posts: 4746
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: timeshift and linux backups

#330653

Postby GeoffF100 » August 3rd, 2020, 7:05 pm

I found this clear description of how to use Timeshift:

https://www.linuxtechi.com/timeshift-ba ... ntu-linux/


Return to “Technology - Computers, TV, Phones etc.”

Who is online

Users browsing this forum: No registered users and 29 guests