Sharing of SVN service backup operation steps

Sharing of SVN service backup operation steps

SVN service backup steps

1. Prepare the source server and target server

  • Source server: 192.168.1.250
  • Target server: 192.168.1.251 root/rootroot

2. Install the SVN server on 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 warehouse. The script is as follows:

cd ~/svn-storage-bak

5. Copy hooks/pre-revprop-change.tmpl to hooks/pre-revprop-change. The script is as follows:

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

6. Add execution permissions to the pre-revprop-change script above. The script is as follows:

chmod u+x hooks/pre-revprop-change

7. Edit the pre-revprop-change script, change the last line exit 1 to exit 0, and save. The operation is as follows:

vim hooks/pre-revprop-change

8. Use svnsync to set up a 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 username and password of the current server. and the username and password of the source svn server

10. Perform SVN synchronization backup. The script is as follows:

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

Then start backing up.

11. Write the synchronization script in step 10 into a script file and redirect the log output to facilitate checking whether the synchronization is successful later. Then set it in the crontab scheduled task. It is executed at 1:00 a.m. every day.

(I now write the synchronization script directly in crontab. It is recommended to write a separate script file to execute it regularly.)

My scheduled task writing method (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 TortoiseSVN client or browser to access the backup SVN server address. Check whether the resource is backed up successfully.

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

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • How to add Nginx to system services in CentOS7
  • Three methods to modify the hostname of Centos7
  • How to upload and check out Maven projects in SVN
  • How to build svn server in linux
  • SVN error: Error Updating changes: svn: E155037 solution
  • How to cancel the association between Android Studio project and SVN
  • A brief introduction to using SVN branches with IntelliJ IDEA
  • Solution to the problem that IntelliJ IDEA's SVN cannot save passwords on MAC
  • How to install the SVN plugin on Webstorm2017
  • Alibaba Cloud Centos7 installation and configuration of SVN

<<:  Problems with index and FROM_UNIXTIME in mysql

>>:  Analysis and solution of data loss during Vue component value transfer

Recommend

CSS and HTML and front-end technology layer diagram

Front-end technology layer (The picture is a bit e...

What is ssh port forwarding? What's the use?

Table of contents Preface 1. Local port forwardin...

Detailed explanation of three commonly used web effects in JavaScript

Table of contents 1 element offset series 1.1 Off...

mysql three tables connected to create a view

Three tables are connected. Field a of table A co...

Detailed explanation of VUE's data proxy and events

Table of contents Review of Object.defineProperty...

Implementation of MySQL joint index (composite index)

Joint Index The definition of the joint index in ...

vue3 timestamp conversion (without using filters)

When vue2 converts timestamps, it generally uses ...

A brief analysis of MySQL cardinality statistics

1. What is the cardinality? Cardinality refers to...

How to implement adaptive container with equal aspect ratio using CSS

When developing a mobile page recently, I encount...

JavaScript implements click toggle function

This article example shares the specific code of ...

Detailed graphic explanation of how to use svg in vue3+vite project

Today, in the practice of vue3+vite project, when...

The difference between GB2312, GBK and UTF-8 in web page encoding

First of all, we need to understand that GB2312, ...

Problems and solutions encountered when installing mininet on Ubuntu 16.04.4LTS

Mininet Mininet is a lightweight software defined...

Analysis of Vue element background authentication process

Preface: Recently, I encountered a management sys...