Importing a Subversion SVN dumped file

You must create the repository folder first, if you do not know how please follow this guide: Adding new repositories for subversion

Step 1: Switch to user root

su -

Step 2: Import your dump into your repository. cat sends the contents of the file into the screen, then the pipe allows us to run another command which tells it to send the data to the svnadmin load command instead.

cat /path/to/file | svnadmin load /path/to/svn/FolderName

All done!

Adding New Repositories for Subversion

This will tell you step by step how to create new repositories for many linux based operating systems, like Fedora and CentOS

This post assumes you already have subversion installed and configured on your server. If you do not I will eventually have a post explaining how to install and configure it.

Step 1: Switch to user root

su -

Step 2: Create a new folder with all your other repositories.

mkdir /path/to/svn/folderName

Step 3: Make this into a version control directory

svnadmin create /path/to/svn/folderName

Step 4: Set the Group and owner of the folder and all files recursively

chown -R apache.apache /path/to/svn/folderName

Step 5: Set the permissions on the files giving access to the owner and group ; read, write, and execute, and everyone else just read and execute

chmod -R 0775 /path/to/svn/folderName

Step 6: Enable web content outside of normal apache directory

chcon -R -t httpd_sys_content_t /path/to/svn/folderName

Step 7: Enable commits over http

chcon -R -t httpd_sys_rw_content_t /path/to/svn/folderName

Step 8: Restart apache

This works on most linux based operating systems

service httpd restart

if not use this:

/bin/systemctl restart httpd.service

This new repository should be ready to go!

If you want to import a pre-dumped file then view this post: Importing a Subversion SVN dumped file