SVN installation and Database Backup

Source: Internet
Author: User

1. Install subversion ( Ubuntu  ):

Sudo apt-Get install Subversion
=> Check whether the installation is successful: dpkg-l Subversion

=> Uninstall the program: sudo apt-Get remove Subversion

Sudo apt-Get autoremove


2. directory where the version library is created:

Mkdir/home/SVN


3. Create a project version Library:

    svnadmin create /home/svn/myproject


4. Modify svnserve. conf (File Location:/home/SVN/CONF/svnserve. conf)

[[Email protected] conf] # vi svnserve. conf

[General]

Anon-access = none

Auth-access = write

Password-DB = passwd

Authz-DB = authz


5. Directory control file authz (File Location:/home/SVN/CONF/authz)

[[Email protected] conf] # vi authz

[Groups]

Admin = zhangsan

[Myproject:/]

@ Admin = RW

* = R


6. Change the User Password File passwd (File Location:/home/SVN/CONF/passwd)

[[Email protected] conf] # vi passwd
[Users]
Zhangsan = *****


7. Start SVN

[[Email protected] WWW] # svnserve-d-r/home/SVN
=>-I is started as inetd.
=> The-D parameter indicates that svnserve will run on the background as a service.
The-R parameter specifies/home/SVN as the root directory of the code library.
In this way, when the client accesses the server using a URL such as SVN: // 192.168.0.1/myproject

The actual library is/home/SVN/myproject.
=> -- Listen-port and -- listen-host can specify the bound address and port,
=>-R can be forcibly set to read-only mode.

Note that/home/SVN is the root directory of the repository and does not overlap with the [myproject:/] Directory.

If they overlap, the following error will be prompted:

[Zhangsan @ blackghost checkout] $ SVN Co SVN: // 127.0.0.1/

SVN: Authorization failed

=> Start startup: add a line to/etc/init/rc. Local: svnserve-d-r/home/SVN


8. Check whether the instance is started.

 ps -ef | grep svnserve

=> Stop the service: killall svnserve


9. Full backup and Incremental Backup SVN

Svnadmin dump/SVN/project/WWW> full. SVN. Bak

# Completely back up the/SVN/project/WWW database and save it as full. SVN. Bak

Svnadmin dump/SVN/project/www-R 8-incremental> SVN. bak.1
# Incrementally store version Library 8 to SVN. bak.1


10. Restore the version library.

Svnadmin create/SVN/project/test # create a new version Library

Svnadmin load/SVN/project/test <full. SVN. Bak # restore full backup

Svnadmin load/SVN/project/test <SVN. bak.1 # restore the Incremental Backup content


11. Hot copy

Svnadmin hotcopy/SVN/project/www/root/backup. SVN. www/
# Hot copy of the WWW version library, which can be used directly


This article is from the "miracle" blog, please be sure to keep this source http://ww0606.blog.51cto.com/7023013/1875559

SVN installation and Database Backup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.