azure-templateskong

Create and restore application backups

Backup

The Bitnami Kong Stack is self-contained and the simplest option for performing a backup is to copy or compress the Bitnami stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continuously.

Follow these steps:

  • Change to the directory in which you wish to save your backup:

    $ cd /your/directory
    
  • Stop all servers:

    $ sudo /opt/bitnami/ctlscript.sh stop
    
  • Remove the following files in Kong’s server directory:

    $ sudo rm /opt/bitnami/apps/kong/server/pids/*.pid
    $ sudo rm /opt/bitnami/apps/kong/server/serf/serf.id
    
  • Create a compressed file with the stack contents:

    $ sudo tar -pczvf application-backup.tar.gz /opt/bitnami
    
  • Restart all servers:

    $ sudo /opt/bitnami/ctlscript.sh start
    

You should now download or transfer the application-backup.tar.gz file to a safe location.

Restore

Follow these steps:

  • Change to the directory containing your backup:

    $ cd /your/directory
    
  • Stop all servers:

    $ sudo /opt/bitnami/ctlscript.sh stop
    
  • Move the current stack to a different location:

    $ sudo mv /opt/bitnami /tmp/bitnami-backup
    
  • Uncompress the backup file to the original directoryv

    $ sudo tar -pxzvf application-backup.tar.gz -C /
    
  • Start all servers:

$ sudo /opt/bitnami/ctlscript.sh start