All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hubert Kario <hka@qbs.com.pl>
To: Freddie Cash <fjwcash@gmail.com>
Cc: Carl Cook <CACook@quantum-sci.com>, linux-btrfs@vger.kernel.org
Subject: Re: Synching a Backup Server
Date: Fri, 7 Jan 2011 17:20:08 +0100	[thread overview]
Message-ID: <201101071720.08298.hka@qbs.com.pl> (raw)
In-Reply-To: <AANLkTimOEsFiF7tiCzV-Y3NfGYHjK+uL_3O6PNDKum90@mail.gmail.com>

On Thursday, January 06, 2011 22:52:25 Freddie Cash wrote:
> On Thu, Jan 6, 2011 at 1:42 PM, Carl Cook <CACook@quantum-sci.com> wr=
ote:
> > On Thu 06 January 2011 11:16:49 Freddie Cash wrote:
> >> > Also with this system, I'm concerned that if there is corruption=
 on
> >> > the HTPC, it could be propagated to the backup server.  Is there=
 some
> >> > way to address this?  Longer intervals to sync, so I have a chan=
ce to
> >> > discover?
> >>=20
> >> Using snapshots on the backup server allows you to go back in time=
 to
> >> recover files that may have been accidentally deleted, or to recov=
er
> >> files that have been corrupted.
> >=20
> > How?  I can see that rsync will not transfer the files that have no=
t
> > changed, but I assume it transfers the changed ones.  How can you g=
o
> > back in time?  Is there like a snapshot file that records the state=
 of
> > all files there?
>=20
> I don't know the specifics of how it works in btrfs, but it should be
> similar to how ZFS does it.  The gist of it is:
>=20
> Each snapshot gives you a point-in-time view of the entire filesystem=
=2E
>  Each snapshot can be mounted (ZFS is read-only; btrfs is read-only o=
r
> read-write).  So, you mount the snapshot for 2010-12-15 onto /mnt,
> then cd to the directory you want (/mnt/htpc/home/fcash/videos/) and
> copy the file out that you want to restore (cp coolvid.avi ~/).
>=20
> With ZFS, things are nice and simple:
>   - each filesystem has a .zfs/snapshot directory
>   - in there are sub-directories, each named after the snapshot name
>   - cd into the snapshot name, the OS auto-mounts the snapshot, and o=
ff you
> go
>=20
> Btrfs should be similar?  Don't know the specifics.
>=20
> How it works internally, is some of the magic and the beauty of
> Copy-on-Write filesystems.  :)

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 snap=
shots =20
to windows clients.
--=20
Hubert Kario
QBS - Quality Business Software
02-656 Warszawa, ul. Ksawer=C3=B3w 30/85
tel. +48 (22) 646-61-51, 646-74-24
www.qbs.com.pl
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-01-07 16:20 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 [this message]
2011-01-09 11:46         ` Alan Chandler
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=201101071720.08298.hka@qbs.com.pl \
    --to=hka@qbs.com.pl \
    --cc=CACook@quantum-sci.com \
    --cc=fjwcash@gmail.com \
    --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 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.