----- Original Message ----- > From: "Mark Phippard" <markp...@gmail.com> > To: "amartin" <amar...@xes-inc.com> > Cc: "users" <users@subversion.apache.org> > Sent: Thursday, December 15, 2016 8:40:43 AM > Subject: Re: Backup using ZFS Snapshots
> On Thu, Dec 15, 2016 at 9:25 AM, Andrew Martin <amar...@xes-inc.com> wrote: > >> > If all of your activity happens via Apache there might be easier ways to >> make >> > all your repositories read only during a backup window and you can also >> always >> > use the start-commit hook as an easy way to make repositories read only. >> >> It's tempting to just stop apache during the backup, but I need to >> continue to >> provide read-only access during the backup window, so apache needs to stay >> on. >> > > I was thinking of two approaches: > > 1. Have a "read-only" Apache httpd.conf that you swap into place and do a > graceful restart and then swap back at end. This configuration would use > some variant of these directives I took from the svnbook: > > # Authorization: Authenticated users only for non-read-only > # (write) operations; allow anonymous reads > <LimitExcept GET PROPFIND OPTIONS REPORT> > Require valid-user > </LimitExcept> > > You would use this concept, not this exact configuration. You would want > basically be configuring the server to only allow read options. > > > 2. The easier approach is the start-commit hook. Just have a single master > hook-script that all repositories are symlinked to. Assuming you do not > use this hook for anything else, you can just have it in place with content > like: > > exit 0; > > Then when you are doing a backup you change it to something like: > > echo "Server is in read-only mode for backup. It should be available again > within N minutes" > exit 1; > > That said, based on the approach you are taking, I do not think you need to > do any of this. Your ZFS snapshot of the filesystem can happen while a > commit is happening since the ultimate backup will be done with an svnadmin > hotcopy and that command will not care if the snapshot grabbed an > in-progress commit. > Thanks for the clarification - those both seem like good approaches as well, but like you said the ZFS snapshot + "svnadmin hotcopy" should be sufficient for my particular use case. Thanks again for the help! Andrew