Discussion:
svnadmin pack vs hotcopy --incremental
Myron A. Semack
2014-08-01 19:17:06 UTC
Permalink
I have an FSFS repository that is backed up nightly with svnadmin hotcopy --incremental. It has just crossed the 80000 revisions mark, and it has never been packed. I would like to run svnadmin pack on this repo.



After I run svandmin pack, will the incremental hotcopy still work? Will the hotcopy mirror the packing in the backup copy of the repo? Or do I need to do a full hotcopy after packing the live repo?



If I schedule svnadmin pack to happen at regular intervals (e.g. weekly), how should I change my nightly backup strategy?



I just want to make sure I do this right so I don't corrupt anything.



For reference, this is a Windows server, running SVN 1.8.8, and the repo is at FSFS version 5.



Sincerely,

Myron A. Semack
Stefan Sperling
2014-08-01 23:58:12 UTC
Permalink
Post by Myron A. Semack
I have an FSFS repository that is backed up nightly with svnadmin hotcopy --incremental. It has just crossed the 80000 revisions mark, and it has never been packed. I would like to run svnadmin pack on this repo.
After I run svandmin pack, will the incremental hotcopy still work? Will the hotcopy mirror the packing in the backup copy of the repo? Or do I need to do a full hotcopy after packing the live repo?
If I schedule svnadmin pack to happen at regular intervals (e.g. weekly), how should I change my nightly backup strategy?
I just want to make sure I do this right so I don't corrupt anything.
For reference, this is a Windows server, running SVN 1.8.8, and the repo is at FSFS version 5.
Sincerely,
Myron A. Semack
If you don't pack and hotcopy concurrently, it's perfectly safe.

If you pack and hotcopy concurrently, it's almost safe.
There is a known problem with concurrent hotcopy and pack, the fix for which
isn't released yet, I believe. Details here: http://svn.apache.org/r1605633
Myron A. Semack
2014-08-04 16:46:06 UTC
Permalink
Post by Stefan Sperling
If you don't pack and hotcopy concurrently, it's perfectly safe.
If you pack and hotcopy concurrently, it's almost safe.
There is a known problem with concurrent hotcopy and pack, the fix for which
isn't released yet, I believe. Details here: http://svn.apache.org/r1605633
What about the --incremental option? Any problems using it in conjunction with pack?

My basic plan for the nightly housekeeping script is:

svnadmin verify %repopath%
svnadmin pack %repopath%
svnadmin hotcopy %repopath% %backupdir% --incremental

I should end up with a properly packed hotcopy at the end, right?

Sincerely,
Myron A. Semack
Stefan Sperling
2014-08-04 18:31:59 UTC
Permalink
Post by Myron A. Semack
Post by Stefan Sperling
If you don't pack and hotcopy concurrently, it's perfectly safe.
If you pack and hotcopy concurrently, it's almost safe.
There is a known problem with concurrent hotcopy and pack, the fix for which
isn't released yet, I believe. Details here: http://svn.apache.org/r1605633
What about the --incremental option? Any problems using it in conjunction with pack?
svnadmin verify %repopath%
svnadmin pack %repopath%
svnadmin hotcopy %repopath% %backupdir% --incremental
I should end up with a properly packed hotcopy at the end, right?
Yes, this should work. The incremental copy notices if the
source was packed since the last incremental copy, creates
corresponding packs in the destination repository and removes
individual revision files from the destination afterwards.

Just make sure not to run the last two commands in your list
concurrently (i.e. pack the source while a hotcopy is in progress)
until the change made in http://svn.apache.org/r1605633 is available
in a released version of Subversion. With the fix, the hotcopy command
will error out if a pack is in progress. Without it, the hotcopy will
succeed but could create a destination repository which is not packed
consistently, which will cause problems.

Loading...