The result was corrupted repositories and when I tried to commit files to one, it reported the path to ...\db\transactions\74-24.txn not found and refused to commit. ...\db\transactions was definitely missing.
This is the command with the switches I used:
XCOPY <source> <destination> /h /o /c /v /k /s
It is the last switch /s that was the culprit. It only copies non-empty directories and files. In svn, you can have empty directories (such as db\transactions) and files with zero bytes. As a result, they were not transferred across.
The correct switch is the /e that will copy empty directories and zero-byte files. So to copy them correctly use the following switches:
XCOPY <source> <destination> /h /o /c /v /k /e
There are two methods that I have found to be more reliable and easier to use.
1) Use Windows XP's NTBackup tool
This is the most reliable way of backing up the entire repository and restoring them. It should be used as a matter of course. I am wondering how well the Win7 replacement of this tools works? Vista's one is totally useless.
2) Use 7za.exe
Make sure Windows users use * to specify all files instead of the Windows' *.* convention for all other commands and to include the -r switch.
No comments:
Post a Comment