Results 1 to 10 of 10

Thread: Snapper and BTRFS File System

  1. #1

    Default Snapper and BTRFS File System

    So..I have an ongoing problem with Snapper running out of space and stopping bootup due to 'No Space left on device'

    I have changed the config file for snapper to only keep the last 2 snapshots and take 1 annual snapshot.
    It's been fine for about 3 months; but this morning couldn't boot up as snapper had messed up again and I had to delete all but the latest (important) update to boot up, which is strange as there were several.

    My question is; do I need snapper? What benefit is it? I've been running openSUSE for 4 years and never needed it.

    I run scheduled weekly backups to NAS with lucky backup; If my system was to get borked /home is on a different drive to '/' so I only need to reinstall that.

    If I don't need snapper....how do I turn it off?

    Thanks,

    Nigel.

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Snapper and BTRFS File System

    You can completely disable snapper during installation by choosing the right magic things in the Edit Proposal and removing the checkmark from "Enable Snapshots".



    However since you've already reinstalled, there's no point in doing that so first:

    Let's first free all data used by snapshots, so as root or with sudo:
    snapper list
    snapper delete 1-x

    Where x is the last snapshot in the list.

    Then throw away snapper;
    zypper rm snapper snapper-zypp-plugin yast2-snapper grub2-snapper-plugin

    Bye bye Snapper!
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3

    Default Re: Snapper and BTRFS File System

    Quote Originally Posted by Miuku View Post
    Then throw away snapper;
    zypper rm snapper snapper-zypp-plugin yast2-snapper grub2-snapper-plugin

    Bye bye Snapper!
    Well, not necessarily.
    It might get reinstalled automatically because it is recommended by the installation patterns.

    So you should probably lock it (or mark as "Taboo - Never install" in YaST).

    Or see here for how to disable it after the installation:
    http://activedoc.opensuse.org/book/o...napper.disable

  4. #4

    Default Re: Snapper and BTRFS File System

    Cheers guys.

    Removed and then locked down in Yast.

  5. #5

    Default Re: Snapper and BTRFS File System

    Hi, I do not understand why to remove Snapper in this case... wasn't the excess of snapshots the problem rather than Snapper itselft?
    The guy does weekly backups but of course Snapper can provide extra benefits. Like restoring damaged areas by a wrong doing with Yast, to the exact status before running Yast/Zypper, instead of a week old status... Do you need Snapper? How old your backups are acceptable it is up to you. I prefer to keep Snapper but with lesser steroids. Its default configs are way WAY WAY too much, I fully agree.
    The full removal also removed the benefits of Snapper (specially if it is a notebook on the go). It sounds to me like removing a wheel of the car because it had too much air inside... just deflate it a little bit guys....
    For those that agree with this approach here goes a howto based in another post, I do not remember where:

    kdesu kwrite /etc/snapper/configs/root

    Then just adjust the cleanup numbers as desired, mainly at the end of the file. Here are my own settings (that can be trimmed even more):

    Code:
    # subvolume to snapshot
    SUBVOLUME="/"
    
    # filesystem type
    FSTYPE="btrfs"
    
    
    # users and groups allowed to work with config
    ALLOW_USERS=""
    ALLOW_GROUPS=""
    
    # sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
    # directory
    SYNC_ACL="no"
    
    
    # start comparing pre- and post-snapshot in background after creating
    # post-snapshot
    BACKGROUND_COMPARISON="yes"
    
    
    # run daily number cleanup
    NUMBER_CLEANUP="yes"
    
    # limit for number cleanup
    NUMBER_MIN_AGE="10"
    NUMBER_LIMIT="2"
    NUMBER_LIMIT_IMPORTANT="1"
    
    
    # create hourly snapshots
    TIMELINE_CREATE="no"
    
    # cleanup hourly snapshots after some time
    TIMELINE_CLEANUP="yes"
    
    # limits for timeline cleanup
    TIMELINE_MIN_AGE="10"
    TIMELINE_LIMIT_HOURLY="10"
    TIMELINE_LIMIT_DAILY="2"
    TIMELINE_LIMIT_MONTHLY="0"
    TIMELINE_LIMIT_YEARLY="0"
    
    # cleanup empty pre-post-pairs
    EMPTY_PRE_POST_CLEANUP="yes"
    
    # limits for empty pre-post-pair cleanup
    EMPTY_PRE_POST_MIN_AGE="10"
    Then you have to delete the old snapshots. in Yast, at the end you will find Snapper and there you can delete them manually or use your terminal/console with:

    Code:
    snapper cleanup timeline
    snapper cleanup number
    snapper empty-pre-post
    Code:
    snapper -c root list       #to check the number of snapshots...


    I had five boxes (desktops and netbooks) all having this strange "no space left" behavior after just a couple of weeks. I recently used this approach, and no problems so far.
    I have no idea why Snapper has not being provided with a graphic config tool to manage these settings inside Yast or Snapper itself...
    best regards!

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,748

    Default Re: Snapper and BTRFS File System

    Snapper in default configuration only takes snaps of root. I guess if you install something and need to back it out it may come in handy. But in 10 years of running Linux I have never had to do that.I could always delete the package via yast/zypper at worst do a new install. If you don't make lots of change the snapshots should not grew huge but if say you maintained a very active database that changed a lot I suspect the the snapshots could grew very fast. Also snapshots are not backup in the case of actual hardware failure or corruption happens. I could see it useful in some commercial and development situations but I don't find a compelling reason for it for the average user. It is juast another shiny shiny

  7. #7

    Default Re: Snapper and BTRFS File System

    Quote Originally Posted by gpsanino View Post
    Hi, I do not understand why to remove Snapper in this case... wasn't the excess of snapshots the problem rather than Snapper itselft?
    Well, it is snapper that creates those snapshots. Uninstalling it is one way to disable the creation of snapshots completely.

    But I at least did point to instructions how to configure snapper instead of uninstalling it...

    I have no idea why Snapper has not being provided with a graphic config tool to manage these settings inside Yast or Snapper itself...
    Yes, that's what I miss as well.
    There definitely should be a way to configure this in YaST->Snapper.
    Last edited by wolfi323; 13-Mar-2015 at 16:32.

  8. #8
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    3,974

    Default Re: Snapper and BTRFS File System

    Quote Originally Posted by wolfi323 View Post
    Well, it is snapper that creates those snapshots. Uninstalling it is one way to disable the creation of snapshots completely.

    But I at least did point to instructions how to configure snapper instead of uninstalling it...


    Yes, that's what I miss as well.
    There definitely should be a way to configure this in YaST->Snapper.
    Did you send in a bug report or feature request?
    -Gerry Makaro
    Fraser-Bell Info Tech
    Solving Tech Mysteries since the Olden Days!
    ~~
    If I helped you, consider clicking the Star at the bottom left of my post.

  9. #9

    Default Re: Snapper and BTRFS File System

    Quote Originally Posted by Fraser_Bell View Post
    Did you send in a bug report or feature request?
    No, I didn't. At least not about that.

  10. #10

    Default Re: Snapper and BTRFS File System

    I had already manually edited the snapper config file; TBH for me, I don't see the benefit of it.
    It's so easy to reinstall either something damaged by Yast or a completely borked instal that I'd rather do that.

    Thanks for all the answers though.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •