Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SVN service backup operation steps sharing

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

SVN service backup operation steps

1. Prepare the source server and target server

Source server: 192.168.1.250 destination server: 192.168.1.251 root/rootroot

2. Install the SVN server for the target server (251). The script is as follows:

Yum install subversion

3. Create a new repository (svnadmin create path). The script is as follows:

Svnadmin create ~ / svn-storage-bak

4. Enter the root directory of the svn-storage-bak repository, and the script is as follows:

Cd ~ / svn-storage-bak

5. Copy hooks/pre-revprop-change.tmpl as hooks/pre-revprop-change, and the script is as follows:

Cp hooks/pre-revprop-change.tmpl hooks/pre-revprop-change

6. Add execution permission to the above pre-revprop-change script as follows:

Chmod upright x hooks/pre-revprop-change

7. Edit the pre-revprop-change script, change the last line exit 1 to exit 0, and then save it. Do the following:

Vim hooks/pre-revprop-change

8. Use svnsync to set the new warehouse synchronization to point to the target warehouse (svnsync init file://// current target svn warehouse path, source warehouse url). The script is as follows:

Svnsync init file:////root/svn-storage-bak svn://192.168.1.250/

9. Then enter the user name and password of the current server. And the user name and password of the source svn server

10. Make a synchronous backup of svn. The script is as follows:

Svnsync sync file:///home/usrname/svn-storage-bak

And then start backing up.

11. Write the synchronization script of step 10 in a script file, and redirect the log output, so that you can see if the synchronization is successful later. Then set it to the crontab scheduled task. The fixed point is executed at 1: 00 a.m. Every day.

(I now write the synchronization script directly in crontab. I suggest writing a separate script file to execute it regularly. )

My scheduled task writing (reference):

12. Start the SVN service. The specific script is as follows:

Svnserve-d-r / root/svn-storage-bak

13. Test to see if the synchronization is successful

Use the TortoiseSVN client or browser to access and back up the svn server address. See if the resource was backed up successfully.

For example: I use 219 to do a test of the target server.

Summary

The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report