svn hotcopy incremental overwrites existing revisions in backup

1k views Asked by At

I use svnadmin hotcopy --incremental command to create backup. Subversion 1.9.5. It was discovered that this command recreates already backuped revisions files which size exceeds e.g. 120kb in directory db/revs/. Backup log (1st backup was made to empty folder, next ones to the same folder):

    C:\Users\Администратор.WIN-DBM2OE9OJ54>svnadmin hotcopy D:\Repositories\Sandbox D:\Test --incremental
* Copied revision 0.
* Copied revision 1.
* Copied revision 2.
* Copied revision 3.
* Copied revision 4.
* Copied revision 5.
* Copied revision 6.
* Copied revision 7.
* Copied revision 8.
* Copied revision 9.
* Copied revision 10.
* Copied revision 11.
* Copied revision 12.
* Copied revision 13.
* Copied revision 14.
* Copied revision 15.
* Copied revision 16.
* Copied revision 17.
* Copied revision 18.
* Copied revision 19.
* Copied revision 20.
* Copied revision 21.
* Copied revision 22.
* Copied revision 23.
* Copied revision 24.
* Copied revision 25.
* Copied revision 26.
* Copied revision 27.
* Copied revision 28.
* Copied revision 29.
* Copied revision 30.
* Copied revision 31.
* Copied revision 32.
* Copied revision 33.
* Copied revision 34.
* Copied revision 35.
* Copied revision 36.
* Copied revision 37.
* Copied revision 38.
* Copied revision 39.
* Copied revision 40.
* Copied revision 41.
* Copied revision 42.
* Copied revision 43.
* Copied revision 44.
* Copied revision 45.
* Copied revision 46.
* Copied revision 47.
* Copied revision 48.
* Copied revision 49.
* Copied revision 50.
* Copied revision 51.
* Copied revision 52.
* Copied revision 53.
* Copied revision 54.
* Copied revision 55.

C:\Users\Администратор.WIN-DBM2OE9OJ54>svnadmin hotcopy D:\Repositories\Sandbox D:\Test --incremental
* Copied revision 14.
* Copied revision 21.
* Copied revision 22.

C:\Users\Администратор.WIN-DBM2OE9OJ54>svnadmin hotcopy D:\Repositories\Sandbox D:\Test --incremental
* Copied revision 14.
* Copied revision 21.
* Copied revision 22.

And so on with each next svnadmin hotcopy --incremental command. Binary comparison revision 14, 21, 22 files of original repository and backup gives equal result. What is the reason of this strange behaviour?

2

There are 2 answers

0
R Sahu On

Incremental backup is supported only for FSFS repositories.

From the output of svnadmin hotcopy --help:

If --incremental is passed, data which already exists at the destination is not copied again. Incremental mode is implemented for FSFS repositories.

Found the following SO post after a quick search: How can I determine whether a Subversion repository was created with a BDB or fsfs backend?

From the accepted answer of that post:

Open the file repository\db\fs-type with a text editor. It either contains bdb or fsfs indicating which backend it uses.

If svnadmin hotcopy --incremental always copies files, the contents of the fs-type file above is most likely bdb.

If you are motivated, you can convert a BDB repository to a FSFS repository.

From http://linuxwisdom.blogspot.com/2007/08/convert-subversion-repository-from-bdb.html:

Create a FSFS repository.

svnadmin create --fs-type fsfs repo2

Dump the first repository.

svnadmin dump repo1 > repo2.dumpfile

Load the dumpfile into the new FSFS repository.

svnadmin load repo2 < repo2.dumpfile
0
Grigoriy On

The problem is in Windows Server Deduplication service. Subversion developers told that apr library have such bug. Disabling deduplication for repository folder solves problem.