Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Tutorials»How to Backup and Restore SVN Repository in Linux

    How to Backup and Restore SVN Repository in Linux

    RahulBy RahulOctober 11, 20152 Mins ReadUpdated:December 31, 2019

    Subversion is the popular version management system widely used for application developments. As a system administrator, you must know the importance of backups. So keep the backup of your all svn repositories on the local server as well as on remote systems. This article will help you to backup and restore the svn repository on the Linux system through the command line.

    You can also set up your own SVN server on Debian based systems and Redhat based systems.

    Backup SVN Repository

    Subversion provides svnadmin utility for managing svn repositories. We can also take a backup of svn repositories using the svnadmin command.

    svnadmin dump /var/svn/myrepo > /backup/svn/myrepo.dump
    
    
    * Dumped revision 0.
    * Dumped revision 1.
    * Dumped revision 2.
    ....
    

    We can also compress backup with gzip and save disk space. Use the following command to backup the svn repository and compress it using gzip command.

    svnadmin dump /var/svn/myrepo | gzip -9 > /backup/svn/myrepo.dump.gz
    

    Restore SVN Repository

    Now if you are required to restore your svn repository from backup. Use the following example to restore the repository from a backup file. For this example, we are creating a new repository to restore the dump.

    First create a new repository using create option.

    svnadmin create /var/svn/mynewrepo
    

    Now restore backup to newly created repository using following command.

    svnadmin load /var/svn/mynewrepo < /backup/svn/myrepo.dump
    
    
    
    <<< Started new transaction, based on original revision 1
         * adding path : svn-auth-screen.PNG ... done.
         * adding path : template.txt ... done.
    
    ------- Committed revision 1 >>>
    
    <<< Started new transaction, based on original revision 2
         * adding path : file1.txt ... done.
         * adding path : file2.txt ... done.
    
    ------- Committed revision 2 >>>
    
    backup dump restore subversion svn svnadmin
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Compare Two Strings in Java
    Next Article Apache Redirect HTTP to HTTPS

    Related Posts

    (Resolved) userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms

    Updated:May 10, 20221 Min Read

    How to Install Apache ActiveMQ on Ubuntu 22.04

    3 Mins Read

    How To Enable SSH Server on Ubuntu 22.04

    Updated:April 22, 20222 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How to Backup Website to Amazon S3 using Shell Script

    Updated:March 24, 20222 Mins Read

    10 Best Linux Video Players in 2022

    Updated:February 18, 20226 Mins Read

    4 Comments

    1. Kalingarajan on October 16, 2021 5:40 pm

      svn dump restore is very slow, how to speed up in ubuntu server.

      Reply
    2. Antti on February 21, 2017 1:15 pm

      Thank you for the straight forward guide! Would you recommend setting up automated backups by using a GUI for managing the SVN repositories? Or is the command line the only suitable option?

      Reply
    3. Santosh on March 25, 2016 10:20 am

      Is there any way, one can import a SVN DUMP of a Project-X into a NODE-X of Project-Y?

      Reply
    4. Vishnu on October 23, 2014 12:22 pm

      How can we add/remove user permission of an SVN repository from a common Password file Eg:(“/etc/svn-auth-conf”?

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.