Backups

There is two ways to backup Kantree:

  • backup the whole installation
  • backup a single team

Backuping the whole installation

Two things need to be backed up to properly recover an instance:

  • the database
  • the uploaded files

Backuping the database

Use standard postgresql tools to do so. Example with pg_dump:

$ pg_dump kantree > kantree-backup.sql

Where kantree is the name of the database

Backuping uploaded files

You just need to backup the folder used for uploaded files (default: ./uploads)

Restoring your installation

  1. Restore the database: psql kantree < kantree-backup.sql
  2. Ensures database permissions are ok
  3. Restore uploaded files
  4. Clear the redis database using the command redis-cli flushall
  5. Restart kantree

Backuping a single team

Via the admin panel

From the admin area of a team, click the “Export” button. This will generate an archive with all the data of this team.

To restore it, go to the “Teams” section of the admin area then “Add a new team” and select “Import from file”

From the CLI

Export the team:

$ ./platform kantree export-team TEAM_ID_OR_SLUG

When using the above command, the generated archive is uploaded to the storage defined in your config (upload folder, S3, …). You can use the --out-dir=/path/to/dir option to specify in which directory to store the generated archive.

To restore the team:

$ ./platform kantree import-team /path/to/archive.tar.gz

(Use --help for additional options)

Backuping individual projects

This can be done only using CLI.

$ ./platform kantree export-project PROJECT_ID_OR_SLUG

When using the above command, the generated archive is uploaded to the storage defined in your config (upload folder, S3, …). You can use the --out-dir=/path/to/dir option to specify in which directory to store the generated archive.

To restore the project:

$ ./platform kantree import-project /path/to/archive TEAM_ID_OR_SLUG

(Use --help for additional options)