Simplest Enterprise Continuous Integration Solutions

Saturday, November 10, 2012

Enterprise Linux: Subversion migration

Example 1: svnadmin load from a subversion backup full dump file

Note:
If the subversion backup full dump file is a .dump.zip zip binary, you need unzip it to .dump file. Otherwise you will get error as below
svnadmin: E140001: Malformed dumpfile header 'PK'
[root@svn-server ~]# unzip my-project-bkup-r0_6-20120604000034.dump.zip
Archive:  my-project-bkup-r0_6-20120604000034.dump.zip
  inflating: my-project-bkup-r0_6-20120604000034.dump
# Create an empty svn repo for my-new-project
[root@svn-server ~]# svnadmin load /opt/csvn/data/repositories/my-new-project < /opt/csvn/data/dumps/my-project/my-project-bkup-r0_6-20120604000034.dump
<<< Started new transaction, based on original revision 1
     * adding path : branches ... done.
     * adding path : tags ... done.
     * adding path : trunk ... done.

------- Committed revision 1 >>>

<<< Started new transaction, based on original revision 2
     * adding path : trunk/ActionTypes-Report.aspx ... done.
     * adding path : trunk/ActionTypes-Report.aspx.vb ... done.
     * adding path : trunk/Images ... done.
     * adding path : trunk/Images/icon-calendar.gif ... done.
     * adding path : trunk/Images/icon-cancel.gif ... done.

------- Committed revision 2 >>>

<<< Started new transaction, based on original revision 3
     * editing path : trunk/Images/icon-calendar.gif ... done.

------- Committed revision 3 >>>

<<< Started new transaction, based on original revision 4
     * editing path : trunk/ActionTypes-Report.aspx ... done.

------- Committed revision 4 >>>

<<< Started new transaction, based on original revision 5
     * editing path : trunk/ActionTypes-Report.aspx ... done.

------- Committed revision 5 >>>

<<< Started new transaction, based on original revision 6
     * adding path : trunk/foo.sh ... done.

------- Committed revision 6 >>>


Example 2: svnadmin load from a subversion backup full dump file with new parent-dir

# Create an empty svn repo for my-new-project, with projects/demo folder under svn repository root
[root@svn-server ~]# svnadmin load /opt/csvn/data/repositories/my-new-project --parent-dir projects/demo < /opt/csvn/data/dumps/my-project/my-project-bkup-r0_6-20120604000034.dump
<<< Started new transaction, based on original revision 1
     * adding path : projects/demo/branches ... done.
     * adding path : projects/demo/tags ... done.
     * adding path : projects/demo/trunk ... done.

------- Committed new rev 2 (loaded from original rev 1) >>>

<<< Started new transaction, based on original revision 2
     * adding path : projects/demo/trunk/ActionTypes-Report.aspx ... done.
     * adding path : projects/demo/trunk/ActionTypes-Report.aspx.vb ... done.
     * adding path : projects/demo/trunk/Images ... done.
     * adding path : projects/demo/trunk/Images/icon-calendar.gif ... done.
     * adding path : projects/demo/trunk/Images/icon-cancel.gif ... done.

------- Committed new rev 3 (loaded from original rev 2) >>>

<<< Started new transaction, based on original revision 3
     * editing path : projects/demo/trunk/Images/icon-calendar.gif ... done.

------- Committed new rev 4 (loaded from original rev 3) >>>

<<< Started new transaction, based on original revision 4
     * editing path : projects/demo/trunk/ActionTypes-Report.aspx ... done.

------- Committed new rev 5 (loaded from original rev 4) >>>

<<< Started new transaction, based on original revision 5
     * editing path : projects/demo/trunk/ActionTypes-Report.aspx ... done.

------- Committed new rev 6 (loaded from original rev 5) >>>

<<< Started new transaction, based on original revision 6
     * adding path : projects/demo/trunk/foo.sh ... done.

------- Committed new rev 7 (loaded from original rev 6) >>>

Note:
In case, you received error message as below
svnadmin: E160013: File not found: transaction '1-1', path 'projects/demo'
please run below "svn mkdir" command
/opt/csvn/bin/svn mkdir https://<svn-repo-server>/svn/my-new-project/projects/demo -m "import under projects/demo folder"

No comments:

Post a Comment