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
- Restore the database:
psql kantree < kantree-backup.sql
- Ensures database permissions are ok
- Restore uploaded files
- Clear the redis database using the command
redis-cli flushall
- Restart kantree
Backuping a single organization
Via the admin panel
From the admin area of an organization, click the “Export” button. This will generate an archive with all the data of this team.
To restore it, go to the “Organizations” section of the Kantree admin area then “Add a new org” and select “Import from file”
From the CLI
Export the organization:
$ ./platform kantree export-org ORG_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 organization:
$ ./platform kantree import-org /path/to/archive.tar.gz
(Use --help
for additional options)
Backuping individual workspaces (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)