Subversionã®ãªãã¸ããªããå¥ã®ãµã¼ãã¼ã«ç§»åããã®ã§ã¡ã¢
æ¦è¦
svnãªãã¸ããªãserver1ããserver2ã«ç§»åããã
両æ¹ã«åããã¼ã¸ã§ã³ã®Suversionãã¤ã³ã¹ãã¼ã«æ¸ã¿ã
ã¡ãªã¿ã«ãå¥ã®ãµã¼ãã¼ã¨ãã£ã¦ããããã¯ã¢ããããä½ã£ãå¥ãµã¼ãã¼ãªã®ã§ãUIDãGIDãå«ãã¦æ§æã¯ã»ã¼åãã§ãã
- ãªãã¸ããª
- /var/svn/repos
[user@server1 svn]$ pwd /var/svn [user@server1 svn]$ ls -l repos/ åè¨ 24 -rw-rw-r-- 1 svnuser svnuser 229 4æ 10 13:25 README.txt drwxrwxr-x 2 svnuser svnuser 4096 4æ 10 13:25 conf drwxrwsr-x 6 svnuser svnuser 4096 6æ 1 19:39 db -r--rw-r-- 1 svnuser svnuser 2 4æ 10 13:25 format drwxrwxr-x 2 svnuser svnuser 4096 4æ 10 13:25 hooks drwxrwxr-x 2 svnuser svnuser 4096 4æ 10 13:25 locks
dbã«sgidãä»ãã¦ããã
ç¾è¡ã®ãªãã¸ããªã確èªãã
[user@server1 svn]$ svnadmin verify /var/svn/repos
åé¡ãç¡ãã£ãã®ã§ããªãã¸ããªã®ç§»åãé²ããã
ãã®æã®ããªãã¸ã§ã³çªå·ãè¦ãã¦ããã¾ãã
ãããã³ãã¼ãåã
[user@server1 svn]$ sudo su svnuser user@server1 Password: [svnuser@server1 svn]$ svnadmin hotcopy /var/svn/repos/ /tmp/backup
svnadmin hotcopyã¯æ¨©éã¯ãã®ã¾ã¾ã«ãã¦ããã¾ãããææè
ã¯svnadmin hotcopyã®å®è¡è
ã«ãªãã¾ãã
ä¸å¿ãææè
ãåãããããã«svnuserã«ãªã£ã¦ããsvnadmin hotcopyããã¾ããã
svnuserã¯/var/svnã¸ã®æ¸ãè¾¼ã¿æ¨©éãç¡ãã£ãã®ã§ã/tmp/backupã«ãã¾ããã
権éãä¿æããã¾ã¾tarã§åºãã
[svnuser@server1 svn]$ tar czfv /tmp/backuprepos.tar.gz -p /tmp/backup
-pãªãã·ã§ã³ã§ã権éãä¿æããã¾ã¾å§ç¸®ããäºãã§ãã¾ãã
å¥ãµã¼ãã¼ã«ãªãã¸ããªã¨ãã¦è¨ç½®ãã
backuprepos.tar.gzããftpãscpãªã©ã§ãserver2ã«ç§»åãã¾ãã
[user@server2 tmp]$ sudo su svnuser user@server2 Password: [svnuser@server2 tmp]$ pwd /tmp [svnuser@server2 tmp]$ tar xzfv backuprepos.tar.gz -p [user@server2 tmp]$ ls tmp/backup/ -l åè¨ 24 -rw-rw-r-- 1 svnuser svnuser 229 6æ 1 20:58 README.txt drwxrwxr-x 2 svnuser svnuser 4096 6æ 1 20:58 conf drwxrwsr-x 6 svnuser svnuser 4096 6æ 1 20:58 db -r--r--r-- 1 svnuser svnuser 2 6æ 1 20:58 format drwxrwxr-x 2 svnuser svnuser 4096 6æ 1 20:58 hooks drwxrwxr-x 2 svnuser svnuser 4096 6æ 1 20:58 locks
ããã§server2ã®/tmp/tmp/backupã«server1ã®/var/svn/reposã®ã³ãã¼ãåºæ¥ã¾ããã
権éãä¿æããã¾ã¾åãåºãããã«ã解åæã-pãªãã·ã§ã³ãä»ããå¿
è¦ãããã¾ãã
ã¡ãªã¿ã«ãsvnuserã«ãªã£ã¦ãã解åãã¦ãã®ã¯ã解åããã¦ã¼ã¶ãææè
ã¨ãªã£ã¦ãã¾ãããã§ãã
å§ç¸®æã«--same-ownerãã¤ããã°è¯ãã£ãã®ããããã¾ããã
[svnuser@server2 tmp]$ pwd /tmp/tmp/backup [svnuser@server2 tmp]$ sudo mv backup /var/svn/repos
server1ã¨åãããã«/var/svn/reposã«ç§»åãã¦å®äºã§ãã
æ¤è¨¼ãã
[user@server2 svn]$ ls /var/svn/repos/ -l åè¨ 24 -rw-rw-r-- 1 svnuser svnuser 229 6æ 1 20:58 README.txt drwxrwxr-x 2 svnuser svnuser 4096 6æ 1 20:58 conf drwxrwsr-x 6 svnuser svnuser 4096 6æ 1 20:58 db -r--r--r-- 1 svnuser svnuser 2 6æ 1 20:58 format drwxrwxr-x 2 svnuser svnuser 4096 6æ 1 20:58 hooks drwxrwxr-x 2 svnuser svnuser 4096 6æ 1 20:58 locks [user@server2 tmp]$ cd /var/svn/
dbã«sgidãã¡ããã¨ããã¾ãã
[user@server2 svn]$ svnadmin verify /var/svn/repos/
svnadmin verifyã§åé¡ãåºã¦ããªãäºã確èªã
ä¸å¿ãæåã«server1ã§å®è¡ããsvnadmin verifyã¨ããªãã¸ã§ã³çªå·ãåãäºã確èªã