Timeshift and the Settings

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
HaveaMint
Level 5
Level 5
Posts: 696
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in the USA
Contact:

Timeshift and the Settings

Post by HaveaMint » Wed Jul 11, 2018 4:30 am

Timeshift as many have explained is designed to create a snapshot of the file system only. It isn’t intended to be used to backup your personal files. Backintime or Grsync is a good tool to backup your personal files.
The default setting will select the first partition because if someone lets Mint install itself without setting specific partitions it will install everything on one partition.
If you select a partition scheme like ( root, home,swap) then you would go into Timeshift settings “Location” and select either Home or an external device formatted to EXT4.
On my Laptop partitioning scheme I selected four partitions (root,home,backup,swap) This is where you need to do a different setting in Timeshift. ANY other partitions other than home or swap is NOT excluded in the backup process and can make for a HUGE backup.
So in Timeshift settings under Filters you will need to Exclude unwanted partitions and other Hard drives if any.
One further note: If you have a snapshot (Hopefully on an external drive also) and you re-partition your drive, the recovery of your saved snapshot will not work without some tinkering. The UUID's will be different after you make new partitions.

Image below in most cases you will select RSYNC
Image

The next image you will select the frequency of your snapshots and how many to keep. You can assume they will be 10 GB per snapshot (probably less) on versions 18.x and 14 GB on versions 19.x You really should only need monthly snapshots and keep 2, It doesn't take long to bring a restored snapshot up to date with the Update Manager. If you are limited on your internet plan then I can see more frequent snapshots.
Image

This image I selected sdb1 to save my snapshots to. sdb and sdc are separate hard drives and sda1 is what I am saving which is root.
Image

That is it for the wizard setup. In my install I have two drives mounted under root which is in the system directory and needs to be filtered from the snapshots.
Image

In file manager under File System I have two drives I named backup and storage, these are the ones that need filtering out.
Image

So in the Settings under filters I added the two folders (backup and storage) to be excluded from the snapshots.
Image

Finally in the main window of Timeshift it shows all your snapshots. The right side of each snapshot you can add comments by DBL Clicking . I chose to keep my original snapshot I did manually with the apps I use installed, from there on it is handled monthly automagically.
Image
Last edited by HaveaMint on Sun Oct 06, 2019 7:15 am, edited 12 times in total.
"Tune for maximum Smoke and then read the Instructions".

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Wed Jul 11, 2018 4:42 am

HaveaMint wrote:
Wed Jul 11, 2018 4:30 am
ANY other partitions other than home or swap is NOT excluded in the backup process and can make for a HUGE backup.
So in Timeshift settings under Filters you will need to Exclude unwanted partitions and other Hard drives if any.
Partitions mounted under /media/* and /mnt/* are by default excluded from the snapshots (see Settings:Filters:Summary).

In case one has opted to mount a device directly under /, then this should be filtered out, if one doesn't want it to be backed up.

Unmounted partitions are not included in the snapshots.

If you want to see what is excluded by default, you can do so by not choosing anything to be included in the snapshot under Settings:Users.
Next, head for Filters:Summary.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Wed Jul 11, 2018 5:40 am

/backup looks like being mounted under root of the file system "/".
You can mount it instead under /mnt or /media in order for it to be excluded from the snapshots by default. Or simply filter it out.
Last edited by Sir Charles on Wed Jul 11, 2018 5:48 am, edited 1 time in total.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
AZgl1500
Level 11
Level 11
Posts: 3536
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Timeshift and the Settings

Post by AZgl1500 » Wed Jul 11, 2018 5:47 am

My laptop has 4 partitions and Timeshift is set to the last one for easy AutoBackups w/o an external drive.


Pictures really help a lot for newbies, let them see what we are talking about.

Image



Image



and here, Timeshift has dutifully backed up any minor changes to the System.
But, as the Gparted pix shows, it does not take up a lot of room to save "the differences".


Image

and for Newbies, advise them to label what those Manual Backups mean, highlight the last one you made, left click, type in something meaningful, hit <enter> to save it. The letter 'D' means an automated Daily Backup.

In the last Manual Update, the letter 'O' means "On Demand", note that it mentions "crontab job added".
That means that I have setup a crontab job to do daily AutoMated System Updates to the laptop.
Level 1, 2, 3 only plus Security Updates Only for Level 4, and ' -nk ' which means " do NOT update the kernel ".

Why? because kernel updates always destroy the WiFi configuration on ASUS laptops with MediaTek WiFi adapters.
if you are not home, or have access to a LAN, you are screwed!
as I am now, 1500 miles from home staying in motels until next week.

My crontab looks like this:
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command

PATH="/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:/usr/local/sbin"

0 12 * * * cat /home/john/add-line >> /home/john/mintupdatetoolcron.log

1 12 * * * date >> /home/john/mintupdatetoolcron.log

2 12 * * * mintupdate-tool -r -l 123 -y -s -nk upgrade >> /home/john/mintupdatetoolcron.log

0 18 * * * date >> /home/john/fstrim.log

5 18 * * * sudo fstrim -a -v >> /home/john/fstrim.log

Everyday at noon, add a dotted line, one minute later, add the date, one minute later, apply updates if any.
at 6 pm, Trim the blanks spaces on the SSD.
Last edited by AZgl1500 on Wed Jul 11, 2018 6:06 am, edited 1 time in total.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Wed Jul 11, 2018 6:59 am

HaveaMint wrote:
Wed Jul 11, 2018 6:26 am
I didn't use extended partitions
No, you didn't. But you have mounted /dev/sda3 (which is your backup partition) atbackup under /, thereby /backup is the mount point as it is shown in the screenshot from Gparted.

If/dev/sda3 was mounted atbackup under, say, /media, the mount point would show as /media/backup and it would be excluded from the snapshots by default.

As it is now it must be filtered out "manually".

Cf. the Gparted view in @AZgl1500's post. He has opted to mount/dev/sda4 (his backup partition) atBackupunder/home/John.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
AndyMH
Level 9
Level 9
Posts: 2524
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Timeshift and the Settings

Post by AndyMH » Wed Jul 11, 2018 8:24 am

To reinforce what has already been said, you are probably better off mounting your backup under /media or /mnt. I've a separate 1TB backup drive in the ultrabay of my T430, in gparted:
Screenshot from 2018-07-11 13-20-15.png
The corresponding entry in fstab is:

Code: Select all

# mount point for HDD in ultrabay, added 3 feb 18
UUID=5cdf25ee-93ed-41a0-96f5-31ff2f85862c /media/Ultrabay ext4 defaults,nofail 0 2
So I didn't have to change from the default include/exclude definitions in timeshift = less hassle.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
AZgl1500
Level 11
Level 11
Posts: 3536
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Timeshift and the Settings

Post by AZgl1500 » Wed Jul 11, 2018 11:41 am

Marziano wrote:
Wed Jul 11, 2018 6:59 am
Cf. the Gparted view in @AZgl1500's post. He has opted to mount/dev/sda4 (his backup partition) atBackupunder/home/John.
I did that to allow me to view that partition in NEMO,

Image


but:
I specify the exact folders to backup for personal stuff, e.g.
Documents
Downloads
Pictures
Videos
Music

and nothing else, that is hard-coded into my backup routine.
keeps my backup files as small as possible, and they can float around on various USB drives and nothing gets lost, no matter how many times they get shuffled around.

If anyone is curious, or does not remember my earlier threads, this laptop has 12gB RAM, so it does not need a SWAP file, so 14 mb is a joke really, good for some text files maybe. just didn't bother to merge it into something else.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Wed Jul 11, 2018 11:53 am

AZgl1500 wrote:
Wed Jul 11, 2018 11:41 am
Marziano wrote:
Wed Jul 11, 2018 6:59 am
Cf. the Gparted view in @AZgl1500's post. He has opted to mount/dev/sda4 (his backup partition) atBackupunder/home/John.
I did that to allow me to view that partition in NEMO,
I got it. Did you have to change ownership for the Backup folder, since Timeshift writes to that partition as root?
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
AZgl1500
Level 11
Level 11
Posts: 3536
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Timeshift and the Settings

Post by AZgl1500 » Wed Jul 11, 2018 1:49 pm

Marziano wrote:
Wed Jul 11, 2018 11:53 am
AZgl1500 wrote:
Wed Jul 11, 2018 11:41 am
Marziano wrote:
Wed Jul 11, 2018 6:59 am
Cf. the Gparted view in @AZgl1500's post. He has opted to mount/dev/sda4 (his backup partition) atBackupunder/home/John.
I did that to allow me to view that partition in NEMO,
I got it. Did you have to change ownership for the Backup folder, since Timeshift writes to that partition as root?
No, Timeshift did not complain, continues to perform as it should.

I set /backup to be readable in NEMO only a couple weeks ago, hasn't always been that way.


I did it in fstab with a lot of coaching from the gurus here:

Code: Select all

  GNU nano 2.5.3                           File: /etc/fstab                                                             

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=25ddd311-91ad-4b80-91f1-ebb7955c288e /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda5 during installation
UUID=d7c79352-1e33-4f28-9827-613f919beb6d /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
#  swap is only  14 mib, disabling it as there is 12 gB of RAM
# UUID=b330d87c-6ce6-43de-be6d-e221cabae2e9 none            swap    sw              0       0
#
#  
# 
UUID=ab702213-06ea-40ad-be34-3e5ab74cece5 /home/john/Backup ext4 defaults,noatime 0 3

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Wed Jul 11, 2018 1:58 pm

Alright. Good idea to have it set up like that for having easy access and overview. My drive being crammed with several OS:es, I keep my snapshots on an ext. drive. Works alright that way also. Just have to hook it up all too often to take the snaps and hopefully not all too often to restore.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Petermint
Level 5
Level 5
Posts: 684
Joined: Tue Feb 16, 2016 3:12 am

Re: Timeshift and the Settings

Post by Petermint » Thu Nov 29, 2018 5:17 pm

The term "backup" should be used with caution. If the backup is to the same storage device, you lose the backup when the device fails. If the backup is in the same computer, you lose the backup when the computer fails. If the backup is in the same location...

One of my customers had computers backing up to each other across a local network. The office roof blew off in a storm. All the computers mixed the rainwater with mains power to produce spectacular failures.

User avatar
t-bone
Level 1
Level 1
Posts: 15
Joined: Thu Nov 22, 2018 5:39 pm

Re: Timeshift and the Settings

Post by t-bone » Sun Dec 02, 2018 6:59 pm

Petermint wrote:
Thu Nov 29, 2018 5:17 pm
The term "backup" should be used with caution. If the backup is to the same storage device, you lose the backup when the device fails. If the backup is in the same computer, you lose the backup when the computer fails. If the backup is in the same location...

One of my customers had computers backing up to each other across a local network. The office roof blew off in a storm. All the computers mixed the rainwater with mains power to produce spectacular failures.
Thanks for this. I'm a total noob, so in addition to absorbing all the other useful tips on this thread, I was struggling with the larger question of "But shouldn't my first priority be to mitigate disaster risk by at least backing up to an external drive?" Granted, not a help if my house blows up, but at least I'm covered for local hardware failures.
t-bone
Northern California

User avatar
Greencedar
Level 3
Level 3
Posts: 183
Joined: Thu Jan 31, 2019 8:29 pm
Location: Missouri.
Contact:

Re: Timeshift and the Settings

Post by Greencedar » Sat Feb 02, 2019 1:05 am

Thank you for the tutorial on Timeshift and the Settings. The photos are a great help.The comments are also helpful
Greencedar

ddurdle
Level 3
Level 3
Posts: 146
Joined: Sat Dec 17, 2011 10:03 am

Re: Timeshift and the Settings

Post by ddurdle » Tue Feb 12, 2019 9:47 am

I was forced to enable timeshift in order to perform the upgrade from LMDE2 to LMDE3 -- it is a pre-req and won't let you start the upgrade.

I noticed from your post that BTRFS is supported. I use BTRFS snapshot (been using them since 2012). What's the difference between doing BTRFS snapshots and "timeshit with BTRFS"?

What I love about BTRFS is that you have effortless backups and when you perform activities like upgrades, you can keep your pre-upgraded system in place while a copy of it is upgraded, so that you boot into either instantly. Then you drop the snapshots when you are done with them (or keep them around for backup).

Luna Moon
Level 1
Level 1
Posts: 10
Joined: Mon Mar 12, 2018 4:22 pm
Contact:

Re: Timeshift and the Settings

Post by Luna Moon » Sun Apr 07, 2019 3:01 am

Thank you guys for helping out us beginners so much! Thanks for the great explanations!

br1anstorm
Level 4
Level 4
Posts: 360
Joined: Mon Nov 24, 2014 8:53 am

Re: Timeshift and the Settings

Post by br1anstorm » Thu Jun 13, 2019 1:46 pm

Sir Charles wrote:
Wed Jul 11, 2018 4:42 am
HaveaMint wrote:
Wed Jul 11, 2018 4:30 am
ANY other partitions other than home or swap is NOT excluded in the backup process and can make for a HUGE backup.
So in Timeshift settings under Filters you will need to Exclude unwanted partitions and other Hard drives if any.
Partitions mounted under /media/* and /mnt/* are by default excluded from the snapshots (see Settings:Filters:Summary).
I'm checking out how exactly to configure Timeshift for my Mint 19.1 setup and came across this exchange of comments. I'm trying to untangle and make sense of what's been said.

HaveaMint says, "Any....partitions other than home and swap is NOT excluded". Getting rid of the double negative, this says any partitions other than home and swap are included in the backup (presumably by default?).

Sir Charles then warns that "Partitions mounted under /media/* and /mnt/* are by default excluded....". OK, that seems clear, and appears to correct or modify what HaveaMint said.

Now ... I have a dual (in fact multi) boot system with Win7, Mint 19.1 and PCLinuxOS installed in an MBR/Legacy/BIOS setup. The two Linux OSs have a shared Data partition on the same hard drive in which all my personal files, photos, documents, music etc are saved. That Data partition is mounted under /mnt/*. Each Linux OS file manager has symlinks to those folders.

So if I want Timeshift to snapshot my Data partition (and I suppose that will make the resulting snapshot file somewhat larger...) will that Data partition, mounted under /mnt/* , be included by default, as HaveaMint suggests; or will it be excluded by default, as Sir Charles says? And if the latter, is it possible to adjust the settings (which seem designed to filter stuff out), so as to include that Data partition?

User avatar
AndyMH
Level 9
Level 9
Posts: 2524
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Timeshift and the Settings

Post by AndyMH » Thu Jun 13, 2019 2:24 pm

The defaults in timeshift exclude /home and a number of other folders such as /mnt. So your data partition mounted in /mnt will not be backed up.

While you can modify the settings in timeshift to include /home, I would strongly recommend that you don't do this. Instead use a complimentary utility such as backintime to take care of your data.
  • Timeshift default = take a snapshot of everything* excluding /home
  • Backintime default = take a snapshot of /home excluding everything else.
This way, screw up the system - do a timeshift restore and your data is untouched, screw up your data do a backintime restore and the system is untouched.

Have you thought about mounting your data partition somewhere else instead of using symlinks? On my dual boot desktop (with win10), there are two ntfs partitions, C: and D:, D: is where my data lives. In mint D: is mounted as /home/me/data. Because it is mounted under /home, backintime takes care of backing up the data on this shared partition. You control what partitions get mounted where in your fstab file (lives in /etc).

Other thoughts - timeshift insists on backing up to a linux format partition, e.g. ext4, backintime doesn't care.

Want to find out what is excluded? Take a timeshift snapshot and then browse the snapshot, there is a file exclude.list that contains all the exclusions.


* subject to excluding some folders where it makes no sense to backup such as /mnt or /tmp or /dev.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

br1anstorm
Level 4
Level 4
Posts: 360
Joined: Mon Nov 24, 2014 8:53 am

Re: Timeshift and the Settings

Post by br1anstorm » Thu Jun 13, 2019 3:43 pm

Thanks AndyMH..... much to study and absorb in your helpful response.

I confess I had thought of adding, in my previous post, a comment to the effect that of course I realise that I have the option of using BackInTime (or similar) to backup/preserve my personal files and data rather than tweaking Timeshift to do so. I very much agree with your logic and your approach of tackling the backups of system and of data separately, using separate tools.

But I didn't want to divert attention from the need to clarify what Timeshift includes by default, and whether and how its settings might be revised - if desired - to capture folders/partitions additional to the defaults.

As for the other point you touch on - of not using symlinks, and/or locating my data somewhere else - that is perilously close to being above my pay grade! I have the shared Data partition set up the way it is and located under /mnt/ because that was how the tutorial I followed recommended it be done. I'm not yet sufficiently familiar with the methods for choosing a different mount point, nor with the editing of fstab to configure some alternative. My current setup (of a shared/symlinked Data partition) ain't broke; so I'm hesitant to try to "fix" or modify it until I'm very sure of what I'm doing, how, and why...

All part of the ongoing voyage of Linux discovery (or the steep learning curve).

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Thu Jun 27, 2019 1:20 am

br1anstorm wrote:
Thu Jun 13, 2019 1:46 pm
Sir Charles wrote:
Wed Jul 11, 2018 4:42 am
HaveaMint wrote:
Wed Jul 11, 2018 4:30 am
ANY other partitions other than home or swap is NOT excluded in the backup process and can make for a HUGE backup.
So in Timeshift settings under Filters you will need to Exclude unwanted partitions and other Hard drives if any.
Partitions mounted under /media/* and /mnt/* are by default excluded from the snapshots (see Settings:Filters:Summary).


So if I want Timeshift to snapshot my Data partition (and I suppose that will make the resulting snapshot file somewhat larger...) will that Data partition, mounted under /mnt/* , be included by default, as HaveaMint suggests; or will it be excluded by default, as Sir Charles says? And if the latter, is it possible to adjust the settings (which seem designed to filter stuff out), so as to include that Data partition?
Hi,

You could verify by yourself which directories are excluded in the snapshots by going to settings:filters:summary.
You could also add any one of the excluded directories to the snapshots in settings:filters: Add Folders.

Hope this helps!
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Timeshift and the Settings

Post by Sir Charles » Thu Jun 27, 2019 3:07 am

AndyMH wrote:
Thu Jun 13, 2019 2:24 pm
Want to find out what is excluded? Take a timeshift snapshot and then browse the snapshot, there is a file exclude.list that contains all the exclusions.
That's not necessary. Before making a snapshot you can have a look at the list of the excluded directories in Settings:Filters:Summary.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Post Reply

Return to “Tutorials”