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

Re: Backup a repository

From: Ingo Schmidt <list_at_der-ingo.de>
Date: 2007-04-19 16:30:58 CEST

Hi!

> At the moment we back up the repository simply with a tar and gzip
> procedure. I did some testing and this way seemed to be the most
> efficient, not in terms of space and speed.

This is very dangerous and really not the way to do it! How do you
make sure that absolutely no one accesses the repository while you
"tar" it?
This approach has to fail at some point. So change it as fast as
possible.

If you do want to use tar and gzip, then please copy your repository
somehwere else first by using:
svnadmin hotcopy oldpath newpath

Then tar and gzip up newpath. If you want to restore, just
untar/ungzip your backup and then do the following:

- rename original repository, e.g. oldpath -> oldpath.bak
- svnadmin hotcopy mybackup oldpath

You may want to take care of file permissions while you do all this!

My questions about this approach:
- What happens, if someone is just accessing the repository while I
rename it?
- What happens, if someone is just trying to access the repository
while I "svnadmin hotcopy" back my backup?

Does the svnadmin hotcopy command "lock" both sides, source and
destination?

> Did I do something wrong?

Yes, not paying close attention to the docs ;)
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.reposadmin.maint.migrate
So in your case, "svnadmin dump" is what you want to use.

Cheers, Ingo =;->

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 19 16:31:14 2007

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