Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to backup SVN repository? [duplicate]

Tags:

I often hear that having an SVN repository doesn't cancel need for backups.

How is such backup done? I mean the repository will inflate over time, won't it? So do I back it up as a whole every time or what do I do?

What's the easiest way to do such backups?

like image 230
sharptooth Avatar asked Mar 31 '11 13:03

sharptooth


People also ask

What is SVN dump?

By default, the Subversion dump stream contains a single revision (the first revision in the requested revision range) in which every file and directory in the repository in that revision is presented as though that whole tree was added at once, followed by other revisions (the remainder of the revisions in the ...


1 Answers

You could use svnadmin dump. For example, to create a compressed backup file in Linux run:

svnadmin dump -q /path/to/repo | bzip2 -9 > repo_backup.bz2 

To restore a backup use svnadmin load:

svnadmin create /path/to/newrepo bzip2 -cd repo_backup.bz2 | svnadmin load /path/to/newrepo 

See also Repository data migration using svnadmin in the SVN Book.

like image 81
Eugene Yarmash Avatar answered Oct 15 '22 01:10

Eugene Yarmash