Results 1 to 4 of 4

Thread: Delete snapshots without Snapper

  1. #1

    Default Delete snapshots without Snapper

    I have tried to delete Snapper snapshots manually (by using rm -r SNAPSHOT_NUM) in the Konsole.
    However, only some files in the snapshot were removed. The rest returned an error message:
    Code:
    rm: cannot remove '102/snapshot/usr/share/doc/packages/libpth20/ANNOUNCE': Read-only file system
    rm: cannot remove '102/snapshot/usr/share/doc/packages/libpth20/AUTHORS': Read-only file system
    rm: cannot remove '102/snapshot/usr/share/doc/packages/libpth20/COPYING': Read-only file system
    
    ...etc.

    Now the snapshot is not accessible by Snapper (it is not listed in
    Code:
    snapper ls
    and therefore I can't delete it using
    Code:
    snapper delete
    ). How do I delete it using rm?

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: Delete snapshots without Snapper

    You can not use RM to remove snapshots you MUST use the snapper functions

    https://en.opensuse.org/Portal:Snapper

    You probably broke it using rm. Don't know how to recover from that

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,079
    Blog Entries
    15

    Default Re: Delete snapshots without Snapper

    Quote Originally Posted by kotleta2007 View Post
    I have tried to delete Snapper snapshots manually (by using rm -r SNAPSHOT_NUM) in the Konsole.
    However, only some files in the snapshot were removed. The rest returned an error message:
    Code:
    rm: cannot remove '102/snapshot/usr/share/doc/packages/libpth20/ANNOUNCE': Read-only file system
    rm: cannot remove '102/snapshot/usr/share/doc/packages/libpth20/AUTHORS': Read-only file system
    rm: cannot remove '102/snapshot/usr/share/doc/packages/libpth20/COPYING': Read-only file system
    
    ...etc.

    Now the snapshot is not accessible by Snapper (it is not listed in
    Code:
    snapper ls
    and therefore I can't delete it using
    Code:
    snapper delete
    ). How do I delete it using rm?
    Hi
    You will have missing snapper metadata, try the following;

    Code:
    btrfs subvolume delete /.snapshots/SNAPSHOTNUMBER/snapshot
    rm -rf /.snapshots/SNAPSHOTNUMBER
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,368
    Blog Entries
    2

    Default Re: Delete snapshots without Snapper

    Quote Originally Posted by gogalthorp View Post
    You can not use RM to remove snapshots you MUST use the snapper functions

    https://en.opensuse.org/Portal:Snapper

    You probably broke it using rm. Don't know how to recover from that
    How about...
    Use snapper to roll back to before the misbegotten "rm" and then run snapper again to remove the snapshot...

    Assumes of course that the integrity of the snapshot being rolled back to is still good... Off the top of my head I can't think of a reason why there should be a problem since snapshots always increment forwards.

    And yes,
    It's a very bad idea to remove snapshots without using Snapper, which will always ensure safe removal.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

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