How to recover repository using SVN hotcopy?

前端 未结 3 720
独厮守ぢ
独厮守ぢ 2021-02-09 06:53

Okay. I used svn\'s hotcopy to make incremental back-ups, now how do I test that the hotcopies will work properly?

I searched the posts here regarding hotcopy. Most o

相关标签:
3条回答
  • 2021-02-09 07:22

    Are you just looking for a smoke test? Just point any client at it (directly on the machine, with the file:// protocol if you want) and do some checkouts- the files constitute a valid repo. The hotcopy is just to make sure you get a consistent copy (eg, checkins that happen during the hotcopy don't screw up the backup).

    0 讨论(0)
  • 2021-02-09 07:23

    Here is another alternate to restoring a hotcopy if someone is looking for an answer. Install Visual SVN Server:-

    1. On the left, right click on Repositories
    2. Select import existing repository
    3. On the dialogue box which opens, click on copy repository from another location
    4. On the next dialogue box select your source repo which basically is your hotcopy
    5. On the next dialogue box paste the location where you want your new repo.
    0 讨论(0)
  • 2021-02-09 07:26

    svnadmin hotcopy will always create full copies of your repository. It is not possible to do incremental backups with svnadmin hotcopy.

    svnadmin hotcopy works like a filesystem copy command, except it will never copy open transactions.

    To restore a repository you can just svn hotcopy your backup to the place from which you want to serve it.

    For checking the integrity of a repository use svnadmin verify

    eg:

    assume your svn repos are on /var/svn/repos and your backups are stored on /var/backups/svn and your repository my_project is broken.

    Use:

    svnadmin hotcopy /var/svn/repos/my_project /var/backups/svn/
    

    to create a new backup (do this every day or week..) and:

    svnadmin hotcopy /var/backups/svn/my_project /var/svn/repos/
    

    to restore your backup (note: you have to remove your repo before, as hotcopy will not overwrite your old repo, also you really should look for the cause of your repository failure).

    Also use:

    svnadmin verify /var/svn/repos/my_project
    

    for checking the integrity of your repository

    0 讨论(0)
提交回复
热议问题