linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How Snapshots Inter-relate?
@ 2011-04-21 17:17 CACook
  2011-04-21 18:47 ` Calvin Walton
  0 siblings, 1 reply; 5+ messages in thread
From: CACook @ 2011-04-21 17:17 UTC (permalink / raw)
  To: linux-btrfs


I have set up a backup server in the garage which does rsync backups of all my servers weekly, and snapshots those backups.  It works wonderfully, and I was able to set it up thanks to help from this listserv, thank you.

But I'm accumulating quite a few backups now, unnecessarily.  After a couple months I only need a representative one, once a month.  I am afraid to delete three of my weekly snapshots out of each month, as I'm afraid they're cumulative.  I might end up with nothing valid if each builds on the last, forever.

How do I resolve this?


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

* Re: How Snapshots Inter-relate?
  2011-04-21 17:17 How Snapshots Inter-relate? CACook
@ 2011-04-21 18:47 ` Calvin Walton
  2011-04-22 15:03   ` CACook
  2011-04-22 15:39   ` Helmut Hullen
  0 siblings, 2 replies; 5+ messages in thread
From: Calvin Walton @ 2011-04-21 18:47 UTC (permalink / raw)
  To: CACook; +Cc: linux-btrfs

On Thu, 2011-04-21 at 10:17 -0700, CACook@quantum-sci.com wrote:
> I have set up a backup server in the garage which does rsync backups
> of all my servers weekly, and snapshots those backups.  It works
> wonderfully, and I was able to set it up thanks to help from this
> listserv, thank you.
> 
> But I'm accumulating quite a few backups now, unnecessarily.  After a
> couple months I only need a representative one, once a month.  I am
> afraid to delete three of my weekly snapshots out of each month, as
> I'm afraid they're cumulative.  I might end up with nothing valid if
> each builds on the last, forever.

You have nothing to worry about. You can delete any snapshot on btrfs
without losing data from any other snapshot. Each snapshot is completely
independent.

This works because data which is shared between multiple snapshots is
reference counted, and won't be deleted until you remove the last
snapshot that references that data.

-- 
Calvin Walton <calvin.walton@kepstin.ca>


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

* Re: How Snapshots Inter-relate?
  2011-04-21 18:47 ` Calvin Walton
@ 2011-04-22 15:03   ` CACook
  2011-04-22 15:30     ` Fajar A. Nugraha
  2011-04-22 15:39   ` Helmut Hullen
  1 sibling, 1 reply; 5+ messages in thread
From: CACook @ 2011-04-22 15:03 UTC (permalink / raw)
  To: linux-btrfs

On Thursday 21 April, 2011 11:47:25 Calvin Walton wrote:
> You have nothing to worry about. You can delete any snapshot on btrfs
> without losing data from any other snapshot. Each snapshot is completely
> independent.
> 
> This works because data which is shared between multiple snapshots is
> reference counted, and won't be deleted until you remove the last
> snapshot that references that data.

Wow.  Awesome job, BTRFS team.

Would it be good practice to say, once a year, do a completely new fresh snapshot?


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

* Re: How Snapshots Inter-relate?
  2011-04-22 15:03   ` CACook
@ 2011-04-22 15:30     ` Fajar A. Nugraha
  0 siblings, 0 replies; 5+ messages in thread
From: Fajar A. Nugraha @ 2011-04-22 15:30 UTC (permalink / raw)
  To: linux-btrfs

On Fri, Apr 22, 2011 at 10:03 PM,  <CACook@quantum-sci.com> wrote:
> Would it be good practice to say, once a year, do a completely new fresh snapshot?

There's no such thing as "new fresh snapshot".

You can create a new, empty subvolume.
Or you can create snapshot of existing root/subvolume, which once
created, behaves just like another subvolume (with the exception that
it contains identical content to the origin root/subvolume).
Or you can create snapshot of a snapshot (which, again, is just
another subvolume with identical content) so in practice there will be
no difference between the first snapshot and the second snapshot.

So if by "new fresh snapshot" you mean "creating a snapshot of
root/subvolume at that time", then you can do it as often as you need.
But if by "new fresh snapshot" you mean something like full backup in
traditional tape backup, then like Calvin said every snapshot is
already independent, so in a way it's a "full backup".

Of course if you're using it for backup purposes then it's usually
best to have a copy elsewhere (not on the same
disk/server/datacenter), but that's beyond the scope of this list.

-- 
Fajar

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

* Re: How Snapshots Inter-relate?
  2011-04-21 18:47 ` Calvin Walton
  2011-04-22 15:03   ` CACook
@ 2011-04-22 15:39   ` Helmut Hullen
  1 sibling, 0 replies; 5+ messages in thread
From: Helmut Hullen @ 2011-04-22 15:39 UTC (permalink / raw)
  To: linux-btrfs

Hallo, Calvin,

Du meintest am 21.04.11:

>> I have set up a backup server in the garage which does rsync backups
>> of all my servers weekly, and snapshots those backups.

[...]

> You have nothing to worry about. You can delete any snapshot on btrfs
> without losing data from any other snapshot. Each snapshot is
> completely independent.

> This works because data which is shared between multiple snapshots is
> reference counted, and won't be deleted until you remove the last
> snapshot that references that data.

That sounds like "hard links"; I use that with my favourite backup  
program "rsnapshot". I like it.

But: if the (only) target of the (many) hard links fails, then it fails  
in all backups. It's a very good idea to make monthly or yearly backups  
of one such hard linked backup to another disk.

Viele Gruesse!
Helmut

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

end of thread, other threads:[~2011-04-22 15:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 17:17 How Snapshots Inter-relate? CACook
2011-04-21 18:47 ` Calvin Walton
2011-04-22 15:03   ` CACook
2011-04-22 15:30     ` Fajar A. Nugraha
2011-04-22 15:39   ` Helmut Hullen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).