Announcement

Collapse
No announcement yet.

Anyone try Timeshift yet?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kubicle
    replied
    Originally posted by GreyGeek View Post
    HOWEVER, snapper still has one major, glaring fault, IMO. It stores the root snapshots under / and the home snapshots under /home.
    You can have a separate snaphots subvolume and have that mounted to /.snapshots, if you wish.
    https://wiki.archlinux.org/index.php...esystem_layout

    Leave a comment:


  • GreyGeek
    replied
    Originally posted by jlittle View Post
    Definitely use something different, at least in addition to Timeshift.


    <ramble mode, ignorable>
    I do backups manually, as well as running "snapper", which takes snapshots regularly, by default every two hours. Snapper has improved a lot since I started using it. (When Greygeek tried it out, IIRC, it filled up his drive and he swore off it.) IIUC Snapper is installed by default on openSUSE, so I imagine there's new user advice and set up recommendations in the openSUSE wiki and forums.

    IMO doing at least some backups yourself is a good idea, because it helps you understand what can be done. The fact that your snapshots are sitting there all the time, and can be explored using dolphin (or your favourite file manager), enables many liberating uses. Delete some stuff by accident? No need to find a backup, you've already got it (if it's not too new). Reverting a system to a snapshot (say, after a bad update) can be done quickly (in seconds) by renaming files and a reboot, so being familiar with the file names helps. </ramble>
    I did swear off of it. OpenSUSE has made regular improvements and it is much better now. One must create config files for both root and home. Root is run with sudo and the home backup does not require sudo. One neat feature is the link to apt that automatically creates a snapshot when it is run so that one can roll back if the install/remove/update/upgrade barfs a lung. If the modifications work as expected one can delete the peremptory snapshot. That's a nice feature but it is easily duplicated manually with a simple sudo snapshot command.

    HOWEVER, snapper still has one major, glaring fault, IMO. It stores the root snapshots under / and the home snapshots under /home. These snapshots are accessible ONLY if you can boot into your system since they are inside @ or @home. IF @ doesn't load then you are out of luck and better have a copy of @ on another HD so you can go through the process of mounting your HD from a LiveUSB and then overwriting @ and @home with your backup versions of @ and @home.

    I save my snapshots OUTSIDE @ or @home. By mounting your HD to /mnt
    mount /dev/disk/by-uuid/ce2b5741-c01e-4b3d-b6ba-401ad7f7fcdf /mnt
    Using vdir /mnt you will see:
    /mnt
    /mnt/@
    /mnt/@home

    You can create /mnt/snapshots and store your snapshots in that folder:
    btrfs su snapshot -r /mnt/@ /mnt/snapshots/@202103141231

    IF /mnt/@ (which is your live, running system!) becomes corrupt and won't boot then you can still mount the drive using a LiveUSB kubuntu (it contains btrfs) because while @ may be corrupt the drive will still mount. Mounted, you can use mv and btrfs to change @202103141231 to a rw snapshots. Then you can
    mv /mnt/@ /mnt/@old
    The system will continue to run even though @ is now @old. And then
    btrfs subvol snapshot /mnt/snapshots/@202103141231 /mnt/@
    Notice the lack of "-r" in the above command. @ will be rw. Ditto for @home if necessary. Never mix up your @ and @home snapshots. I.E., don't use snapshots of @ and @home taken at different times.

    Now shut down the LiveUSB and reboot. Your system will start up.

    Leave a comment:


  • rdonnelly
    replied
    I use Luckybackup for my /home, USB thumb drives, and Vbox machines.
    Also have 2 hard drives, I connect one at a time, and clone and swap on a monthly basis.
    Just installed Timekeep, you can never have enough protection.

    Leave a comment:


  • jlittle
    replied
    Originally posted by Chopstick View Post
    But what I really need the backup for is when I loose the laptop or the drive fails. Is there a way to do both, local snapshots and external backups, with Timeshift, or should I just use something different?
    Definitely use something different, at least in addition to Timeshift.
    Originally posted by Timeshift github readme
    Timeshift for Linux is an application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS...
    It is designed to protect only system files and settings. User files such as documents, pictures and music are excluded.
    <ramble mode, ignorable>
    I do backups manually, as well as running "snapper", which takes snapshots regularly, by default every two hours. Snapper has improved a lot since I started using it. (When Greygeek tried it out, IIRC, it filled up his drive and he swore off it.) IIUC Snapper is installed by default on openSUSE, so I imagine there's new user advice and set up recommendations in the openSUSE wiki and forums.

    IMO doing at least some backups yourself is a good idea, because it helps you understand what can be done. The fact that your snapshots are sitting there all the time, and can be explored using dolphin (or your favourite file manager), enables many liberating uses. Delete some stuff by accident? No need to find a backup, you've already got it (if it's not too new). Reverting a system to a snapshot (say, after a bad update) can be done quickly (in seconds) by renaming files and a reboot, so being familiar with the file names helps. </ramble>

    Leave a comment:


  • GreyGeek
    replied
    Originally posted by Chopstick View Post
    ...
    Regarding Timeshift: is seems to store its snapshots in '/run/timeshift/backup/timeshift-btrfs/snapshots', so would it be possible to just copy/send these snapshots to an external drive every now and then?
    Similarly, if you uninstall Timeshift, can you not just delete these snapshots?
    It is recommended that you use TimeShift to delete the snapshots it creates. @ and @home both appear under /run/timeshift/backups while also appearing under /mnt if you mount your btrfs drive to /mnt. I deleted TimeShift first and then attempted to delete the snapshots under /run/.,... causing my @ and @home to be deleted. Only then did I discover the caveat that TimeShift must delete its own snapshots before it is deleted.

    Originally posted by Chopstick View Post
    I guess I am not really confident in my understanding of how snapshots and incremental backups work under the hood. Is it like Git, where you essentially need to copy the entire history of diffs since your last complete (checked-out) version of the repo and said checked-out base to get a complete copy, so that if you only copy the diffs without the base, you are screwed?
    Or can you just copy a snapshot, even if it was an incremental one, and the filesystem will make sure that you end up with a complete copy on the volume that you are sending to (and possibly copying everything, if there are no previous increments present)?
    The "repo" (repository) has no bearing on making or handling BTRFS snapshots. And, "diffs", i.e., the "incremental" part of send & receive, is handled entirely by the send & receive command. Keep in mind that while the receive part of the command usually expects to be operating on a BTRFS subvolume, it is possible to send your system as an ASCII stream, using the "-f" switch to an HD that is formatted using some other file system, like EXT4 or FAT32, etc.... Using the send & receive command in reverse using "-f" converts the ASCII data back to a snapshot.

    Generally, one should use the "-r" (read only) switch when creating a snapshot. That is because snapshots used for backup are generally sent to remote drives. One can mv or copy a rw snapshot anywhere under its <ROOT_FS> system but only an ro snapshot can be sent to remote locations using send & receive, i.e., one made using the "-r" switch.

    The command
    btrfs send -p /mnt/snapshots/@mm01yyyy /mnt/snapshots/@mm02yyyy | btrfs receive /backup

    uses @mm01yyyy as the parent snapshot and a copy of that snapshot is expected to already be on /backup from a previous send & receive. The receive command sees mm01yyyy and looks for it on /backup. Using it, receive then takes what send gives it ... the difference between @mm01yyyy and @mm02yyyy ... and adds it to a copy of @mm01yyyy, creating @mm02yyyy on /backup. Ditto for each successive day. A few minutes ago I ran my backup script. It took exactly 30 seconds to make @202103132115 on /mnt/snapshots/ and then use that snapshot and the one made yesterday to create a diff stream which was sent by send & receive to /backup, my remotely mounted drive.

    Keep in mind that while using -r during the snapshot command to make a ro snapshot, if one has to restore using an ro snapshot it must first be converted to a rw snapshot using the command:
    btrfs property set -ts /path/to/snapshot ro falseChange "false" to true to make a snapshot read only. Read only snapshots freezes the state of the system at the moment it was created. If you do not use an incremental backup and just send & receive the entire snapshot of your system to a remote drive it can take 15 to 30 minutes or more, depending on how big your system is, to send that snapshot. Before I packed @home into @ it took me about 10 min to send @ and about 15 minutes to send @home. My <ROOT-FS> subvolume size is about 130GB. If I didn't use incremental backups instead of taking 30 seconds to send my @ it would take about 30 minutes. However, you can continue to use your system while that snapshot is being sent, if you want to.

    When first created, snapshots are essentially empty and composed mainly of meta data. As you use your system and modify a file a copy of it before any changes is written to all relevant snapshots. Older snapshots began filling up and eating your drive space. While one could theoretically take a snapshot every minute of their system, the BTRFS developers recommend not creating more than a dozen or so snapshots for each subvolume. And, at some point, began deleting the oldest snapshots as the newest ones are created. Fstrim run about once a month or so discards unused blocks.. Fstrim.timer fires it off.

    :~$ systemctl status fstrim
    ● fstrim.service - Discard unused blocks on filesystems from /etc/fstab
    Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
    Active: inactive (dead)
    TriggeredBy: fstrim.timer
    Docs: man:fstrim(8)


    Leave a comment:


  • Chopstick
    replied
    Thanks for the summary - sounds like you have a good system!

    Regarding Timeshift: is seems to store its snapshots in '/run/timeshift/backup/timeshift-btrfs/snapshots', so would it be possible to just copy/send these snapshots to an external drive every now and then?
    Similarly, if you uninstall Timeshift, can you not just delete these snapshots?

    I guess I am not really confident in my understanding of how snapshots and incremental backups work under the hood. Is it like Git, where you essentially need to copy the entire history of diffs since your last complete (checked-out) version of the repo and said checked-out base to get a complete copy, so that if you only copy the diffs without the base, you are screwed?
    Or can you just copy a snapshot, even if it was an incremental one, and the filesystem will make sure that you end up with a complete copy on the volume that you are sending to (and possibly copying everything, if there are no previous increments present)?

    Leave a comment:


  • GreyGeek
    replied
    TimeShift has two glaring problems:
    1) It cannot store snapshots on remote locations
    2) IF you plan to uninstall TimeShift you MUST first delete all your snapshots before you uninstall it. Otherwise, it will bork your system. I experienced that personally.

    Since making a snapshot is so easy, and the send & receive commands allow incremental backups, I wrote my own backup script to do that. Now, all I do to make a local and incremented remote snapshot is to run "sudo /make_snapshot.sh" in a Konsole. I've been too lazy to add it to the menu. Also, I cut my snapshot overhead and workload in half by merging the @home subvolume into @ and commenting out the line in /etc/fstab the mounts @home at /home. Thus, I only have to make one snapshot of @ to capture my entire system. Last night, making a local snapshot of @ as @202103122023 and then doing an incremental backup to my remote HD took all of about 10-15 seconds. I have my script set to keep 5 snapshots, adding a new one and dropping the oldest one every day. The script is here. Modifying it for both @ and @home is something you'd have to do.

    Oshunluver addressed the task of sending snapshots to remote servers using ssh.

    And, here is a method for remote backups using BTRFS.

    EDIT:
    For clarity, I do not send my snapshots to remote drives. I have two additional drives mounted in my laptop (3 in total), and I back up to the 2nd and 3rd. I also have several external USB drives which I mount at /backup and send incremental snapshots to them. Regardless, my total backup snapshot time rarely exceeds 2 minutes. The time is mostly less than 30 seconds.
    Last edited by GreyGeek; Mar 13, 2021, 01:57 PM.

    Leave a comment:


  • Chopstick
    replied
    Hey, so this may be a bit late to this thread, but it relates to Timeshift.
    I've recently (Feb. '21) reinstalled my system with BTRFS and LUKS full disk encryption, following this guide:
    https://mutschler.eu/linux/install-guides/ubuntu-btrfs/
    As recommended in the guide, I also installed Timeshift as well as timeshift-autosnap-apt and grub-btrfs.
    I have not used Timeshift to restore anything, but it is creating regular snapshots and had a nice GUI

    That being said, I am a bit disappointed that eventhough it supports a nice tiered backup scheme, it can only back up to a single location, which at the moment is on the same physical drive as my system and home. I consider this less than ideal. I realize that for frequent snapshots it is much faster on the same partition due to CoW and grub-btrf would probably only work that way, right?

    But what I really need the backup for is when I loose the laptop or the drive fails. Is there a way to do both, local snapshots and external backups, with Timeshift, or should I just use something different? Or is there a way I could just mirror the timeshift-btrfs folder on an external drive? I am worried that if I do that, I will end up with only incremental changes, but not the base copy... which would make it pretty useless for a complete system restore.
    Thoughts? What strategy do you use?

    Leave a comment:


  • TWPonKubuntu
    replied
    I had no problem with the application files being in my smaller partition. It was the large snapshot footprint, which was filling all my partition space. Fixed that by moving the location setting.

    Leave a comment:


  • GreyGeek
    replied
    https://teejeetech.in/timeshift/
    Remember to delete all snapshots before uninstalling TimeShift. Otherwise the snapshots continue to occupy space on your system. To delete all snapshots, run the application, select all snapshots from the list (CTRL+A) and click the Delete button on the toolbar. This will delete all snapshots and remove the /timeshift folder in the root directory.

    If you used the installer to install Timeshift, you can remove the installed files with following command:
    sudo timeshift-uninstall
    .
    Last edited by GreyGeek; May 04, 2020, 06:24 PM.

    Leave a comment:


  • TWPonKubuntu
    replied
    Yes, I have it installed. One word of advice to users, go into Settings->location and pick a partition which has enough room for the snapshot files. They can be large. I tried the first time using my smaller /sda partition and immediately ran out of space. I moved the location to /sdb (/home) where I have the majority of my working space available.
    Last edited by TWPonKubuntu; May 04, 2020, 04:38 PM.

    Leave a comment:


  • oshunluvr
    started a topic Anyone try Timeshift yet?

    Anyone try Timeshift yet?

    https://teejeetech.in/timeshift/

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X