I have a large repository on a Windows machine. I would like to copy this entire repository on to another machine, ideally without going via 'dump' or using svnsync. If I can GUARANTEE that no file is changed during the copy process, can I simply make an exact file copy on the second machine using tradition file copying techniques?
3 Answers
If you're using the Berkeley DB repository storage, then you do need to be very careful - including matching of versions, and even OS. However, if you're using the Fast Secure File System (FSFS, currently the default on any new repositories), it is VERY portable. I do this regularly, and haven't had any issues copying the repository between systems, including Linux <-> Windows, and even between Subversion 1.6 and 1.7. (Just watch the Subversion release notes if you are crossing Subversion versions.)

- 27,712
- 8
- 86
- 94
If you have exactly the same version for subversion in both systems, it should be OK. I have done this before without facing any issues.
Even with different versions, it is still supposed to work, from svn book:
There are many reasons for dumping and loading Subversion repository data. Early in Subversion's life, the most common reason was due to the evolution of Subversion itself(...). Now, these types of schema changes haven't occurred since Subversion's 1.0 release, and the Subversion developers promise not to force users to dump and load their repositories when upgrading between minor versions (such as from 1.3 to 1.4) of Subversion.
For your specific situation (version 1.6 vs 1.7) there is a paragraph in the release notes for version 1.7 that clarifies the situation:
Subversion 1.7 servers use the same repository format as Subversion 1.6. Therefore, it is possible to seamlessly upgrade and downgrade between 1.6.x and 1.7.x servers without changing the format of the on-disk repositories. (This is not correct in general for any pair of 1.x and 1.y servers, but happens to hold for 1.6 and 1.7.)

- 10,361
- 3
- 38
- 68
-
Thanks. There are slight differences - it's 1.6 on the source machine and 1.7 on the target. I have tried this and it seems to be fine, but I'm wondering if there are hidden issues. – Brian Frost Nov 23 '11 at 17:40
-
I'm thinking Subversion will upgrade the repo for you. But if it does, that'd mean that your repo won't be compatible with the older version anymore. – cHao Nov 23 '11 at 17:43
-
2I know for sure that 1.5 to 1.6 fails...doing a dump should not be too hard, I would recommend you to go that way for your case if possible. – yms Nov 23 '11 at 17:43
-
yms: subversion maintains strict downward compatibility. I migrated and copied between all version from 1.3 to 1.7 in all possible combinations, always without any problem. As long as you disable write access before you copy, otherwise you will end up with inconsistent revisions in revs, revprop and current – Peter Parker Nov 23 '11 at 20:49
-
@Peter I know that's the theory (see my edit), I was just refering to my own experience. – yms Nov 23 '11 at 21:04
You can do this for FSFS repositories without any problems, as long as the subversion version on the new computer is at least the same version. disable write access while you copy the files.

- 1
- 1

- 29,093
- 5
- 52
- 80