All of lore.kernel.org
 help / color / mirror / Atom feed
* reorganizing my snapshots: how to move a readonly snapshot? (btrbk)
@ 2021-07-27 16:47 Dave T
  2021-07-27 17:33 ` Graham Cobb
  0 siblings, 1 reply; 5+ messages in thread
From: Dave T @ 2021-07-27 16:47 UTC (permalink / raw)
  To: Btrfs BTRFS

I'm using btrbk to create regular snapshots. I see a way I can improve
the organization of my snapshots now that I have more experience with
this tool, but it requires moving existing snapshots to a different
directory.

I would prefer to avoid re-creating the full initial snapshot in the
new location and I would prefer to avoid losing the existing
incremental snapshots. I also want to preserve the existing parent
relationships used by my snapshot tools (mainly btrbk).

I'm thinking about using the solution mentioned here:
https://unix.stackexchange.com/a/149933

> To set a snapshot to read-write, you do something like this:
> btrfs property set -ts /path/to/snapshot ro false

My plan would be to change the ro property to false, move the
snapshots, reset the ro property to true, and change my btrbk.conf to
match the new path.

What are the caveats in this plan?

Thank you.

Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reorganizing my snapshots: how to move a readonly snapshot? (btrbk)
  2021-07-27 16:47 reorganizing my snapshots: how to move a readonly snapshot? (btrbk) Dave T
@ 2021-07-27 17:33 ` Graham Cobb
  2021-07-28 15:29   ` Dave T
  2021-07-29  0:57   ` Dave T
  0 siblings, 2 replies; 5+ messages in thread
From: Graham Cobb @ 2021-07-27 17:33 UTC (permalink / raw)
  To: Dave T, Btrfs BTRFS


On 27/07/2021 17:47, Dave T wrote:
> I'm using btrbk to create regular snapshots. I see a way I can improve
> the organization of my snapshots now that I have more experience with
> this tool, but it requires moving existing snapshots to a different
> directory.
> 
> I would prefer to avoid re-creating the full initial snapshot in the
> new location and I would prefer to avoid losing the existing
> incremental snapshots. I also want to preserve the existing parent
> relationships used by my snapshot tools (mainly btrbk).
> 
> I'm thinking about using the solution mentioned here:
> https://unix.stackexchange.com/a/149933
> 
>> To set a snapshot to read-write, you do something like this:
>> btrfs property set -ts /path/to/snapshot ro false
> 
> My plan would be to change the ro property to false, move the
> snapshots, reset the ro property to true, and change my btrbk.conf to
> match the new path.
> 
> What are the caveats in this plan?

I believe that setting snapshots read-write and then back to ro is not
recommended and is unsupported. It may work but I am sure I have seen
reports of problems with send/receive when snapshots have been made rw,
changed and then set ro again.

I recommend using the btrbk archive feature to move your existing
snapshots and then start building on top of those. I think I did exactly
this a long time ago when I was in a similar position of wanting to move
my btrbk setup.

Graham

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reorganizing my snapshots: how to move a readonly snapshot? (btrbk)
  2021-07-27 17:33 ` Graham Cobb
@ 2021-07-28 15:29   ` Dave T
  2021-07-29  0:57   ` Dave T
  1 sibling, 0 replies; 5+ messages in thread
From: Dave T @ 2021-07-28 15:29 UTC (permalink / raw)
  To: Graham Cobb; +Cc: Btrfs BTRFS

On Tue, Jul 27, 2021 at 1:34 PM Graham Cobb <g.btrfs@cobb.uk.net> wrote:
>
>
> On 27/07/2021 17:47, Dave T wrote:
> > I'm using btrbk to create regular snapshots. I see a way I can improve
> > the organization of my snapshots now that I have more experience with
> > this tool, but it requires moving existing snapshots to a different
> > directory.
> >
> > I would prefer to avoid re-creating the full initial snapshot in the
> > new location and I would prefer to avoid losing the existing
> > incremental snapshots. I also want to preserve the existing parent
> > relationships used by my snapshot tools (mainly btrbk).
> >
> > I'm thinking about using the solution mentioned here:
> > https://unix.stackexchange.com/a/149933
> >
> >> To set a snapshot to read-write, you do something like this:
> >> btrfs property set -ts /path/to/snapshot ro false
> >
> > My plan would be to change the ro property to false, move the
> > snapshots, reset the ro property to true, and change my btrbk.conf to
> > match the new path.
> >
> > What are the caveats in this plan?
>
> I believe that setting snapshots read-write and then back to ro is not
> recommended and is unsupported.

I have heard something vague about that before, which is why I asked
before doing it. It still seems unclear, but I'll avoid that approach
unless someone confirms it is OK.

> It may work but I am sure I have seen
> reports of problems with send/receive when snapshots have been made rw,
> changed and then set ro again.
>
> I recommend using the btrbk archive feature to move your existing
> snapshots and then start building on top of those. I think I did exactly
> this a long time ago when I was in a similar position of wanting to move
> my btrbk setup.

Thank you for the idea. The archive feature is the one btrbk feature I
have not explore yet. It looks simple to use. btrbk is a nice tool.

>
> Graham

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reorganizing my snapshots: how to move a readonly snapshot? (btrbk)
  2021-07-27 17:33 ` Graham Cobb
  2021-07-28 15:29   ` Dave T
@ 2021-07-29  0:57   ` Dave T
  2021-07-29 10:10     ` Graham Cobb
  1 sibling, 1 reply; 5+ messages in thread
From: Dave T @ 2021-07-29  0:57 UTC (permalink / raw)
  To: Graham Cobb; +Cc: Btrfs BTRFS

On Tue, Jul 27, 2021 at 1:34 PM Graham Cobb <g.btrfs@cobb.uk.net> wrote:
>
>
> On 27/07/2021 17:47, Dave T wrote:
> > I'm using btrbk to create regular snapshots. I see a way I can improve
> > the organization of my snapshots now that I have more experience with
> > this tool, but it requires moving existing snapshots to a different
> > directory.
> >
> > I would prefer to avoid re-creating the full initial snapshot in the
> > new location and I would prefer to avoid losing the existing
> > incremental snapshots. I also want to preserve the existing parent
> > relationships used by my snapshot tools (mainly btrbk).
> >
> > I'm thinking about using the solution mentioned here:
> > https://unix.stackexchange.com/a/149933
> >
> >> To set a snapshot to read-write, you do something like this:
> >> btrfs property set -ts /path/to/snapshot ro false
> >
> > My plan would be to change the ro property to false, move the
> > snapshots, reset the ro property to true, and change my btrbk.conf to
> > match the new path.
> >
> > What are the caveats in this plan?
>
> I believe that setting snapshots read-write and then back to ro is not
> recommended and is unsupported. It may work but I am sure I have seen
> reports of problems with send/receive when snapshots have been made rw,
> changed and then set ro again.
>
> I recommend using the btrbk archive feature to move your existing
> snapshots and then start building on top of those. I think I did exactly
> this a long time ago when I was in a similar position of wanting to move
> my btrbk setup.

I tried the btrbk archive feature. It doesn't fit my use case.
ERROR: Source and target subvolumes are on the same btrfs filesystem!

Any other suggestions? (I am running kernel 5.13)
Thanks

>
> Graham

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reorganizing my snapshots: how to move a readonly snapshot? (btrbk)
  2021-07-29  0:57   ` Dave T
@ 2021-07-29 10:10     ` Graham Cobb
  0 siblings, 0 replies; 5+ messages in thread
From: Graham Cobb @ 2021-07-29 10:10 UTC (permalink / raw)
  To: Dave T; +Cc: Btrfs BTRFS

On 29/07/2021 01:57, Dave T wrote:
> I tried the btrbk archive feature. It doesn't fit my use case.
> ERROR: Source and target subvolumes are on the same btrfs filesystem!

Ah, yes, I remember now. When I used it I was moving to a new backup
disk at the same time as reorganising. You would need a spare disk (at
least temporarily) or enough space on your current disk to create a new
filesystem in a separate partition.

My only other suggestion would be to take a temporary copy of your
latest snapshots somewhere else (such as external disk, or cloud
service) then delete all your snapshots and set up btrbk again. Of
course, that would lose your snapshot history.

Sorry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-29 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 16:47 reorganizing my snapshots: how to move a readonly snapshot? (btrbk) Dave T
2021-07-27 17:33 ` Graham Cobb
2021-07-28 15:29   ` Dave T
2021-07-29  0:57   ` Dave T
2021-07-29 10:10     ` Graham Cobb

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.