Back Up and Restore SwaggerHub On-Premise Data and Configuration

You can back up your SwaggerHub On-Premise data and configuration. These backups are useful in the following cases:

  • As an additional backup method to supplement VM snapshots.

  • If you need to transfer your data to another SwaggerHub On-Premise instance (for example, when migrating to another hypervisor).

What is included in a backup

A SwaggerHub On-Premise backup includes:

  • All the data from the main SwaggerHub application:

    • all users (both active and inactive)

    • all organizations, teams, and projects

    • all API definitions, domains, and versions

    • collaborators and comments

    • integration settings

    • and other

  • Admin Center configuration: authentication method, SMTP and proxy settings, SSL certificates, custom codegen templates, and so on

  • SwaggerHub system logs

Not included: License, SSH users, NTP settings.

Manage backups

You can create, manage, and restore backups on the System page of the Admin Center. The Backups table lists all the available backups stored on your SwaggerHub On-Premise instance.

Managing backups

Create a backup

Click Backup to create a new backup. Backups are saved as a .tar.gz file, with a timestamp in the file name:

backup_<version>_2020-03-05-11-51-37UTC.tar.gz

After creating a backup, you may want to download it to your computer (see below) and then copy it to a remote location.

Download a backup

We strongly recommend that you save backups to a remote location for added backup protection. To do that, click Download next to a backup to download it to your computer. Then you can copy this backup to the desired remote location.

Restore a backup

Important

A backup can be restored only to the same version of SwaggerHub from which it was taken. For example, a backup from v. 1.25.0 cannot be restored to v. 1.25.1 or 1.29.0.

To restore a backup:

  1. If the backup is stored outside SwaggerHub, you first need to copy it to SwaggerHub’s internal storage. To do that, click Import and browse for the backup file (.tar.gz). This backup will then appear in the Backups table.

  2. In the Backups table, click Restore next to the backup you want to restore and confirm the action by clicking OK.

  3. You will see the "Processing. Please wait..." popup. It stays visible for the entire duration of the restore. The restore may take a few minutes to complete, depending on the amount of data.

    Do not close browser or navigate away while the restore is in progress.

    A backup is being restored
  4. Wait until this popup disappears.

  5. After the restore is complete, the Server Status changes to Completed:

    Status: Completed

You can now close the Admin Center or perform other tasks.

Delete a backup

You can delete old backups to free up disk space. To do that, click Delete next to the backup you want to delete.

Automate backup creation

There is a bash script to create SwaggerHub On-Premise backups automatically:

go.gifhttps://s3.amazonaws.com/onprem-files/get-backup.sh

You can have this script to run regularly as a cron job. For details, see Automated Data Backups.

See Also

Publication date: