linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Chandler <alan@chandlerfamily.org.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: Synching a Backup Server
Date: Sun, 09 Jan 2011 11:46:59 +0000	[thread overview]
Message-ID: <4D29A033.7000803@chandlerfamily.org.uk> (raw)
In-Reply-To: <201101071720.08298.hka@qbs.com.pl>

On 07/01/11 16:20, Hubert Kario wrote:
>
> I usually create subvolumes in btrfs root volume:
>
> /mnt/btrfs/
>          |- server-a
>          |- server-b
>          \- server-c
>
> then create snapshots of these directories:
>
> /mnt/btrfs/
>          |- server-a
>          |- server-b
>          |- server-c
>          |- snapshots-server-a
>                   |- @GMT-2010.12.21-16.48.09
> 	            \- @GMT-2010.12.22-16.45.14
>          |- snapshots-server-b
>          \- snapshots-server-c
>
> This way I can use the shadow_copy module for samba to publish the snapshots
> to windows clients.
>    


Can you post some actual commands to do this part

I am extremely confused about btrfs subvolumes v the root filesystem and 
mounting, particularly in relation to the default subvolume.

For instance, if I create the initial file system using mkfs.btrfs and 
then mount it on /mnt/btrfs is there already a default subvolume?  or do 
I have to make one?  What happens when you unmount the whole filesystem 
and then come back

The wiki also makes the following statement

*"Note:* to be mounted the subvolume or snapshot have to be in the root 
of the btrfs filesystem."


but you seems to have snapshots at one layer down from the root.


I am trying to use this method for my offsite backups - to a large spare 
sata disk loaded via a usb port.

I want to create the main filesystem (and possibly a subvolume - this is 
where I start to get confused) and rsync my current daily backup files 
to it.  I would then also (just so I get the correct time - rather than 
do it at the next cycle, as explained below) take a snapshot with a time 
label. I would transport this disk offsite.

I would repeat this in a months time with a totally different disk

In a couple of months time - when I come to recycle the first disk for 
my offsite backup, I would mount the retrieved disk (and again I am 
confused - mount the complete filesystem or the subvolume?)  rsync 
(--inplace ? - is this necessary) again the various backup files from my 
server and take another snapshot.

I am hoping that this would effectively allow me to leave the snapshot I 
took last time in place, as because not everything will have changed it 
won't have used much space - so effectively I can keep quite a long 
stream of backup snapshots in place offsite.

Eventually of course the disk will start to become full, but I assume I 
can reclaim the space by deleting some of the old snapshots.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk


  reply	other threads:[~2011-01-09 11:46 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 17:35 Synching a Backup Server Carl Cook
2011-01-06 19:16 ` Freddie Cash
2011-01-06 19:34   ` Marcin Kuk
     [not found]   ` <AANLkTik-rhXAHW18id4WMMtdqXkicvzTZ47+2r6YMuY0@mail.gmail.com>
2011-01-06 19:47     ` Freddie Cash
2011-01-06 20:07       ` C Anthony Risinger
2011-01-06 20:13         ` Freddie Cash
2011-01-06 20:21           ` C Anthony Risinger
2011-01-06 21:06             ` Gordan Bobic
2011-01-06 21:39               ` Freddie Cash
2011-01-06 21:44         ` Carl Cook
2011-01-06 21:53           ` Gordan Bobic
2011-01-06 21:58           ` Freddie Cash
2011-01-06 22:26             ` Carl Cook
2011-01-06 22:29               ` Gordan Bobic
2011-01-06 23:07               ` Carl Cook
2011-01-07 16:14                 ` Hubert Kario
2011-01-06 23:15               ` Fajar A. Nugraha
2011-01-06 21:42   ` Carl Cook
2011-01-06 21:52     ` Freddie Cash
2011-01-07 16:20       ` Hubert Kario
2011-01-09 11:46         ` Alan Chandler [this message]
2011-01-09 13:54           ` Fajar A. Nugraha
2011-01-09 15:32             ` Alan Chandler
2011-01-09 17:59               ` Freddie Cash
2011-01-09 18:30                 ` Hugo Mills
2011-01-09 20:57                   ` Alan Chandler
2011-01-09 22:01                     ` Hugo Mills
2011-01-09 23:32                       ` Alan Chandler
2011-01-11 22:25                         ` Hugo Mills
2011-01-10  2:22                       ` Fajar A. Nugraha
2011-01-11 22:41                         ` Hugo Mills
2011-01-21 19:28                   ` Freddie Cash
2011-01-22 13:45                     ` Hugo Mills
2011-01-24 17:45                       ` Freddie Cash
2011-01-22 13:55                     ` Hubert Kario
2011-01-25 17:29                       ` Kaspar Schleiser
2011-01-25 17:43                         ` Hubert Kario
2011-01-25 17:59                           ` Freddie Cash
2011-01-25 18:36                             ` Hubert Kario
2011-01-10 13:14           ` Hubert Kario
2011-01-06 20:12 ` Fajar A. Nugraha
2011-01-06 21:43   ` Carl Cook
2011-01-06 21:43 ` Goffredo Baroncelli

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=4D29A033.7000803@chandlerfamily.org.uk \
    --to=alan@chandlerfamily.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    /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 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).