[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Filesystem snapshots
Seems like I haven't chimed in yet…
Am 22. April 2016 18:24:01 MESZ, schrieb Graham Percival <gperciva@tarsnap.com>:
> On Sat, Apr 16, 2016 at 10:42:40AM +0100, John wrote:
> > In order to archive data when constant updating takes place, even
> > just an email INBOX or a SQL database, the data has to stop
> > changing. The frozen unchanging data is the source for the archive
> > and an overspill area, called - very misleadingly - a snapshot, can
> > accumulate written blocks of fresh data. When the archive is
> > finished, the snapshot can be merged back into the original files
> > and deleted.
>
> I've never used LVM, but this sounds suspicious to me. Shouldn't you
> be
> making the backup from a read-only copy of your filesystem? I don't
> understand why there is anything that needs to be merged.
>
Let me point out that LVM takes
snapshots on the block level, not in
the filesystem. Even NTFS' shadow
copies are a function of the filesystem
but LVM's snapshots are not, the
filesystem sits on top of the logical
volume.
> > My X system has remained up but logged off throughout this nightly
> > crontab root script, and that's kept files open and updating on
> > /home. The merge has only been queued by the lvconvert command and
> > will only take effect when /home is unmounted and then mounted
> > again. I need to automate closing X, unmounting and remounting /home
> > and starting X again and I can't think how to do that neatly within
> > the crontab root script.
>
> Hmm. This page about LVM:
> http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html
> doesn't include any merging.
> […]
>
> ... thinking through this a bit more, are
> you storing your tarsnap cache
> directory on the partition which is being
> backed up? That would be a
> plausible reason for wanting it to be
> read/write, but my first thought
> is that it would be to use read-only
> snapshots and put the cache on
> another partition.
I agree, have the cache somewhere
writable, avoid needing to merge and
take your backup from the read-only
snapshot.
> Hope this helps!
> - Graham
Regards, Florian