v1

Databases And Persistence /

Backup, restore, and import data

You can create, import, and delete backups of your database from the backups page, as well as restore your database from an existing backup.

Create a backup

When you create a new backup it will be scheduled for creation, check the entry on the backups page to view its status.

Backup types

Disk backup

Takes a snapshot of the state of the whole volume. Each new disk backup you create will only store the differences from the previous backup.

This incremental way of storing backup data is highly efficient and uses a minimal amount of storage space, this makes it the best method for regular backups.

Native backup

Creates a text dump of the full existing database and stores it in a zipped file. Native backup is not available for some databases.

Import a backup

You can import a backup from the following sources. Once imported you can restore from the saved backup.

URL or file upload

You can restore a database from a file by providing the URL to the hosted file, for example https://yourdomain.com/backups/data.db.gz, or uploading a file. If the file ends in .gz Northflank will attempt to unzip it, otherwise it will be treated as clear text. Northflank will copy the imported file, which will be used as a source when restoring the backup. Please note that when you restore from this kind of import:

  • All existing user databases will be removed. The default admin and access users and system databases will not be affected.
  • All databases from the backup source will be imported
  • The default admin and access users will have full access to the imported database. If these users have been deleted they will be recreated before restoring.
  • If the source includes user manipulation commands (create user, grant permissions), they will be executed unless they grant too many rights

Connection string

You can restore from another database by providing a connection string with relevant credentials and parameters. Northflank will create a dump from the source database which you can then restore from.

Please note that when you restore from this kind of import:

  • All existing user databases will be removed. The default admin and access users and system databases will not be affected.
  • All databases, except users, from the backup source will be imported (depending on the access of the specified user when importing by connection string)
  • The default admin and access users will have full access to the imported database. If these users have been deleted they will be recreated before restoring.
DatabaseConnection string syntax example
MongoDBmongodb://user:password@mongodb0.yourdomain.com:port
RedisCurrently unsupported
MySQL (using JDBC)jdbc:mysql://user:password@yourdomain.com:port
PostgreSQLpostgresql://user:password@yourdomain.com:port

Restore from a backup

The backups page will display a list of backups with the name, status, size, completion time, status of the last attempted restore, number of restores, date of the last restore, creation date, and controls. You can click on the entry in the list to view the restore history, view the logs of each restoration, and abort scheduled restorations. You can access the following controls using the buttons on each entry:

Download

Download the backup as a gzip (.gz) archive file.

Restore

Select to restore from this backup. Your backup will be scheduled and executed shortly.

Delete

Removes the backup from Northflank.

© 2022 Northflank Ltd. All rights reserved.