What is a good and easy way to back up SVN repo to an FTP server?

I would like to backup my SVN repo using tar and ftp from cronjob once a day. This is pretty simple, but I would like to make sure that there is no commit transaction at the time of the backup, etc. Although there are times of the day / night when this is unlikely, I would prefer not to rely on it, because if I am already at night in some kind of crunch, the last thing I need is my SVN or my backups, damaged .

I am looking for a very simple but effective defense. This is normal if the SVN clients receive an error while performing the backup (this does not take much time). Should i use

  • something at the file system level
  • some hook svn script
  • something else completely

I started publishing this on serverfault, but then decided that it was a little closer to programming than sysadmin, especially if hooks were involved. Feel free to move it if you think otherwise.

+3
source share
6 answers

The theoretical way to securely backup is to use the command svnadmin hotcopy( more details here ). Basically this is a copy of one repository (not a dump, copy), so it blocks all operations during this time.

This operation is pretty fast, so I don’t think that any client will have an error, they may experience some delay (depending on the load on the server, etc.).

script - Apache subversion.

, , , , .

  • , - . , 1.4 1.5 1.6, , , . , .
  • , , .

, , , , . , , , (hotcopy) - .

+6

svnadmin dump /path/to/repo > repobackup_date

tar, gzip, repobackup_date, svnadmin .

svnadmin load /path/to/repo < repobackup_date.

+3

svn.

svn dump . , , . ftp, .

svn dump gzip - zip.

+1
0

svnadmin hotcopy

0

svn-backup. , , , , . script , svnadmin, .

script, subversion 8 ~ 20 . FTP-.

0

Source: https://habr.com/ru/post/1722503/


All Articles