I seem to have forgotten to choose "reply all" for this one. So for the sake of 
completeness my reply again (I now know that there are read-only snapshots):

That command will create a snapshot subvolume and just mount it at the 
specified directory, correct? I am not such a big fan of this, as the snapshot 
would then be exposed at file level and I can probably accidentially delete (or 
modify) those files on the snapshot subvolume making it not a snapshot of a 
certain point in time anymore?

With management of snapshots I did not mean cron (automating stuff), but having 
an easy and error prone interface for creating and interacting with already 
created snapshots (like deleting old ones or comparing things).

Von: Andrei Borzenkov <[email protected]>
Gesendet: Montag, 21. Dezember 2020 19:40
An: Claudius Ellsel <[email protected]>; Roman Mamedov 
<[email protected]>; Remi Gauvin <[email protected]>
Cc: linux-btrfs <[email protected]>
Betreff: Re: AW: WG: How to properly setup for snapshots 
 
21.12.2020 21:35, Claudius Ellsel пишет:
> I was aware that snapshots are basically subvolumes. Currently I am looking 
> for an easy way to achieve what I want. I currently just want to be able to 
> create manual snapshots

btrfs subvolume snapshot / /snapshot

> and an easy way to restore stuff on file level.

cp /snapshot/sub/dir/file /sub/dir/file

> For that (including the management of snapshots), snapper seems to be the 
> best way, as btrfs does not offer such features (in an easy way) out of the 
> box afaict.

Yes, btrfs does not reimplement cron in kernel space.

> 
> Unfortunately the documentation for snapper is also not nice, I just had a 
> closer look again. The best I could find was the Arch wiki but that also 
> starts right away with how to create a config (without telling whether that 
> is even needed for basic usage).
> 
> Ultimately I'd like to have a btrfs Wiki entry for snapshots and am willing 
> to help with it.
> 
> Von: Andrei Borzenkov <[email protected]>
> Gesendet: Montag, 21. Dezember 2020 19:26
> An: Roman Mamedov <[email protected]>; Remi Gauvin <[email protected]>
> Cc: Claudius Ellsel <[email protected]>; linux-btrfs 
> <[email protected]>
> Betreff: Re: WG: How to properly setup for snapshots 
>  
> 21.12.2020 20:37, Roman Mamedov пишет:
>> On Mon, 21 Dec 2020 12:05:37 -0500
>> Remi Gauvin <[email protected]> wrote:
>>
>>> 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
>>
>> It sounds like this could plant a misconception right from the get go.
>>
>> You don't really put snapshot* "into" a subvolume. Subvolumes do not actually
>> contain other subvolumes, since making a snapshot of the "parent" won't
>> include any content of the subvolumes with pathnames below it.
>>
>> As such there's no benefit in storing snapshots "inside" a subvolume. There's
> 
> Having dedicated subvolume containing snapshots makes it easy to switch
> your root between subvolumes (either for roll back or transactional
> updates or whatever) and retain access to snapshots by simply mounting
> containing subvolume. Having them in subdirectory of your (root)
> subvolume means you can no more remove this subvolume without also
> destroying snapshots before, so you are stuck with it.
> 
> So it makes all sort of sense to think in advance and prepare dedicated
> subvolume for this purpose.
> 
>> not much of the "inside". Might as well just create a regular directory for
>> that -- and with less potential for confusion.
>>
>> * - keep in mind that "snapshot" and "subvolume" mean the same thing in 
>> Btrfs,
>>      the only difference being that "snapshot"-subvolume started its life as
>>      being a full copy(-on-write) of some other subvolume.
>>

Reply via email to