[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn_fs/svn_repo repository lock API

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 8 Aug 2012 09:50:12 -0400

On 08/08/2012 07:38 AM, Philip Martin wrote:
> I've been asked about using operating system snapshots to make backups
> of live repositories. These could be filesytem snapshots like ZFS or
> FreeBSD's UFS2, or block level snapshots like Linux's LVM, or maybe even
> a Windows shadow copy. The reasons for using snapshots, rather than
> "svnadmin hotcopy", are that it's a better fit with the overall backup
> strategy or that it is faster or requires less disk space or less IO.
> This has also been discussed on the mailing lists, e.g.
> http://svn.haxx.se/users/archive-2012-02/0233.shtml
> As far as I know the snapshot method should work provided there are no
> bugs in Subversion or the snapshot code but it would be good to have
> more confidence that it works.
>
> One of our customers asked about locking the FSFS write-lock file before
> taking the snapshot as this would halt writes and make the repository
> quiescent. It's certainly possible to do it, I wrote a program that
> calls the private API svn_fs_fs__with_write_lock, but calling a private
> API is a hack and I need to lock the rep-cache as well.
>
> So I was wondering whether we should introduce a public API to do this
> properly either at the svn_fs_ or svn_repos_ level. For FSFS this would
> stop writes while allowing reads. A BDB implementation would probably
> stop reads as well.

This seems reasonable. I can envision the likes of an
svn_fs_freeze()/svn_fs_unfreeze() API pair, with svn_repos_* flavors thereof
for adding hook support.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2012-08-08 15:50:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.