2/26 If I want to rsync a perforce or svn directory while users
are checking things in, could I wind up with a corrupted copy?
\_ sure why not. if you are really cool, your copy of the svn
repo is on LVM, and you snap the LVM to copy it.
\_ It'll seem less cool when you realize you've taken a snapshot
of a block level device, which only guarantees that this set of
blocks is not changing. It doesn't guarantee you that the
filesystem sitting on top of them is in a coherent state. What
if you were in the middle of writing a file and had only written
half of the blocks in that file when you took your block level
snapshot? You're going to need to fsck it. Go up one *more*
level to get to your source control system (and whether the set
of files being written is part of this checkin or that).
The poster below already mentioned perforce checkpoints. He's
right. In subversion you probably want to make use of
svnadmin hotcopy when backing up a repository while it's in use.
\_ Yes, you could. Checkpoint the perforce depo first and then
sync the checkpoints. There are other options, too.
\_ I usually do this in Perforce:
1. Run "p4 changes" to find the latest changelist number at that
moment. Say, 12345.
2. Run "p4 sync //...@12345". Other uses might be submitting or
might have submitted new changelists, but that's okay.
For #1, sometimes I instead get the last changelist of the previous
day, or the last changelist before the last nightly build started.
You can also do "p4 sync" by specifying a date and time. Of course,
checkpoints or labels are cleaner ways, but my company doesn't use
those. |