tags:

views:

558

answers:

2

... what happens if someone tries to commit during a svnadmin dump REPOS_PATH?

The subversion book doesn't say anything about that.

A: 

If a dump is in progress then subsequent commits will hang until the dump is complete.

Mike Q
This is incorrect. If you try it out yourself you'll see that a running dump does not force the commit to wait. The resulting dump, however, will include only the revisions that were in the repository at the time that the dump was started. Commits made after the dump started will not be included, but you can use the -r option to get the new revisions in a second dump file after your first dump has completed.
bendin
I stand corrected. I did try it out at the time and the commit appeared to hang while the dump was running but tried it again now and it does complete while the dump is running.
Mike Q
+5  A: 

A concurrently running svnadmin dump will not interfere with new commits. The resulting dump file, however, will only contain the revisions that were present in the repository when you started svnadmin dump.

You'll need to grab commits made while the initial dump was running with a second dump.

Other options you might be interested in:

svnadmin hotcopy
Unlike a dump file, this will include conf and hooks.

svnsync
For maintaining a read-only clone of an existing repository.

Of the three, I make the most use of svnsync. It allows me to keep a second copy of our repositories on a separate machine, which is closer to me. This makes for a nice backup, as well as for faster checkouts. (If the svnsync clone and the original have the same UUID, you can svn co svn://the-clone and then svn switch --relocate svn://the-clone https://the-original)

bendin
I didn't know dumping won't interfere with repo changes. Thanks for telling us. (Do you have a reference for this?)
sbi
No, I don't have a reference, though I recall it coming up in a discussion on the subversion user's mailing list some time ago. I've looked, but can't find the thread. So, I just tried it out by making commits to one of my repositories while I was dumping it.
bendin
bendin
@bendin: Thanks for the pointer!
sbi