On 10/7/2013 3:37 PM, rvaede wrote:
>
>
> I am confused on how to backup my repositary.
Note: Making a raw file-level backup of a SVN repository is not
advisable. There may be open files, files that changed while the backup
is running, etc. So you will need to use one of the hotcopy / dump
methods to get a good "snapshot" of the repository state for inclusion
onto a backup tape/disk/set.
If you want to backup everything, including server-side hook scripts and
the like which are stored under the repository directory, take a look at
"svnadmin hotcopy". It's essentially an rsync (but not quite) of the
origin repository directory. The hotcopy directories (since they only
change once per day, or whenever you do the hotcopy) are ideal for being
used to backup the repository.
http://svnbook.red-bean.com/nightly/en/svn.ref.svnadmin.c.hotcopy.html
The "svnadmin dump" is more suitable for long-term archival of the SVN
repository because it stores the data in platform-neutral format. It
will be much larger then the original repository was (even with gzip -5)
and will take a long time to perform the dump.
http://svnbook.red-bean.com/nightly/en/svn.ref.svnadmin.c.dump.html
The third option is to run a hot-spare system using the svn sync. Except
that this does not give you generational backups, so you still need to
use either hotcopy/dump as well.
http://svnbook.red-bean.com/nightly/en/svn.ref.svnsync.html
Personally: I prefer hotcopy for daily backups, then using rdiff-backup
to make a backup of the hotcopy directory or our main backup server. The
rdiff-backup step gives me the ability to go back to any day within the
past 26 weeks (configurable). Combined with the use of generational
media, I have multiple copies of the rdiff-backup target directory.
(rsnapshot would also be a good choice.)
I'll also make svnadmin dumps every few months, but it takes a long time
to do, uses up a lot of disk space (3x for us) and has few advantages
compared to the rdiff-backup of the hotcopy directory.
Received on 2013-10-08 04:54:43 CEST