All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudius Ellsel <claudius.ellsel@live.de>
To: Remi Gauvin <remi@georgianit.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: AW: WG: How to properly setup for snapshots
Date: Mon, 21 Dec 2020 20:45:51 +0000	[thread overview]
Message-ID: <AM9P191MB16502C509C161C5827FC1686E2C00@AM9P191MB1650.EURP191.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AM9P191MB1650AE92A25D9618163309E5E2C00@AM9P191MB1650.EURP191.PROD.OUTLOOK.COM>

I had a closer look at snapper now and have installed and set it up. This seems to be really the easiest way for me, I guess. My main confusion was probably that I was unsure whether I had to create a subvolume prior to this or not, which got sorted out now. The situation is apparently still not ideal, as to my current understanding it would have been preferable to set up a subvolume first at root level directly after creating the files system. However, as this is only the data drive in the machine (OS runs on an ext4 SSD) it is at least not planned to simply swap the entire volume to a snapshot but rather to restore snapshots at file / folder level, where snapper can also be used for.

One can possibly also safely achieve the same with only using btrfs commandline tools (I made the mistake of not thinking about read only snapshots when I wrote about my fear to delete / modify mounted snapshots). Still I have a better feeling when using snapper, as I hope it is less easy to screw things up with it :)

Thanks all for your input and help!

Let me know if somebody want to improve the Wiki together to make entry easier for beginners.

Von: Claudius Ellsel <claudius.ellsel@live.de>
Gesendet: Montag, 21. Dezember 2020 19:04
An: Remi Gauvin <remi@georgianit.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Betreff: AW: WG: How to properly setup for snapshots 
 
I have backups of the important data, but not for all data on that volume. Thus I wanted to make clear that I don't just want to copy paste stuff I find on the internet and motivate why I am asking here and want to have reliable sources. But thanks for the hint anyway, I also plan to have a better backup strategy once this project is finished. Unfortunately I don't have a better one right now where this is in an intermediate state.

> You have 1 subvolume, which is the root of your filesystem.

I still doubt that a bit, `sudo btrfs subvolume list /media/clel/NAS` (which is where I mount the volume with an fstab entry based on the UUID) does not output anything. Additionally I read (I guess on a reddit post) that in this case one has to create a subvolume first. That might have been problematic information, though.

I don't like experimenting and thus try to get the relevant information first. Also I want to state again that I hope, we can improve the Wiki to contain the information, so there is somewhat "official" documentation for this.

I'll probably read some more about snapper, although what I have read so far did not seem that well documented for first time users (for example I still don't know whether it will "just work" or needs some prerequisites).

Von: Remi Gauvin <remi@georgianit.com>
Gesendet: Montag, 21. Dezember 2020 18:05
An: Claudius Ellsel <claudius.ellsel@live.de>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Betreff: Re: WG: How to properly setup for snapshots 
 
On 2020-12-21 11:11 a.m., Claudius Ellsel wrote:

> Unfortunately I am already at a somewhat production stage where I
don't want to lose any data.
>

You should first and foremost make sure you have backups of everything.

> 
> The problem might be that I currently don't have any subvolumes set up at all. Am I still be able to create snapshots in this stage or do I have to create a subvolume first from which snapshots can be created afterwards?
> 

You have 1 subvolume, which is the root of your filesystem.  You can
make snapshots of it.. (and each snapshot will be a new subvolume)  To
make your life easier, as you start experimenting, I suggest making a
new Read/Write subvolume to put your snapshots into

btrfs subvolume create .my_snapshots
btrfs subvolume snapshot -r /mnt_point /mnt_point/.my_snapshots/snapshot1

(Note: You will not be able to move or rename the snapshot1
folder, but you *will* be able to move or rename the entire
my_snapshots subvolume



> Also I learned about snapper from SUSE which sounds nice, but I don't want to break things while trying to use it.
> 

Snapper is an amazing tool... You should familiarize yourself and be
comfortable with the btrfs subvolume command first, (things will make
more sense if you know whats going on...), but Snapper makes it a.. snap
to automate the snapshots *and* the clean-up.



  parent reply	other threads:[~2020-12-21 20:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM9P191MB165033908B55F8312178D90AE2CB0@AM9P191MB1650.EURP191.PROD.OUTLOOK.COM>
2020-12-21 16:11 ` WG: How to properly setup for snapshots Claudius Ellsel
2020-12-21 17:05   ` Remi Gauvin
2020-12-21 17:37     ` Roman Mamedov
2020-12-21 18:14       ` Remi Gauvin
2020-12-21 20:14         ` Goffredo Baroncelli
2020-12-21 20:27           ` Remi Gauvin
2020-12-21 20:52             ` Goffredo Baroncelli
2020-12-21 18:26       ` Andrei Borzenkov
2020-12-21 18:35         ` AW: " Claudius Ellsel
2020-12-21 18:40           ` Andrei Borzenkov
2020-12-21 20:51             ` AW: " Claudius Ellsel
2021-01-06 20:07               ` Ulli Horlacher
2020-12-21 20:24         ` WG: " Goffredo Baroncelli
2020-12-21 18:04     ` AW: " Claudius Ellsel
2020-12-21 18:32       ` Remi Gauvin
2020-12-21 18:39         ` AW: " Claudius Ellsel
2020-12-21 20:45       ` Claudius Ellsel [this message]
2020-12-21 23:33         ` Graham Cobb
2020-12-22 15:19           ` AW: " Claudius Ellsel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM9P191MB16502C509C161C5827FC1686E2C00@AM9P191MB1650.EURP191.PROD.OUTLOOK.COM \
    --to=claudius.ellsel@live.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=remi@georgianit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.