main
ROOT /
pages /
backup-restore.md
26 lines | ISO-8859-1 | 1 KB

Backup and Restore


Database Backup

  1. Manual backup from GUI Login to OneDev as administrator, navigate to menu Administration / Database Backup, and click the button Backup Now
  2. Manual backup from command prompt Switch OneDev to maintenance mode and run below command (assume OneDev is installed in /opt/onedev):

    /opt/onedev/bin/backup-db.(sh|bat) /path/to/backup.zip
    
  3. Schedule auto-backup Login to OneDev as administrator, navigate to menu Administration / Database Backup, and enable auto backup

Database Restore

To restore database from an existing backup file, switch OneDev to maintenance mode and run below command (assume OneDev is installed in /opt/onedev):

/opt/onedev/bin/restore-db.(sh|bat) /path/to/backup.zip

Repository Backup

The folder /opt/onedev/site (assume OneDev is installed in /opt/onedev) contains git repositories, attachments and other important data. It should be backed up periodically. You may use some volume backup tools or file sync tools for this purpose.

Please wait...
Page is in error, reload to recover