vikunja/docs/content/doc/setup/backups.md
kolaente 1984527fae
All checks were successful
continuous-integration/drone/pr Build is passing
docs: adjust documentation to reflect single-binary deployments
2024-02-09 19:09:19 +01:00

1.3 KiB

date title draft type menu
2019-02-12:00:00+02:00 What to backup false doc
sidebar
parent
setup

What to backup

There are two parts you need to back up: The database and attachment files.

{{< table_of_contents >}}

Files

To back up attachments and other files, it is enough to copy them [from the attachments folder]({{< ref "config.md" >}}#basepath) to some other place.

Database

MySQL

To create a backup from mysql use the mysqldump command:

mysqldump -u <user> -p -h <db-host> <database> > vkunja-backup.sql

You will be prompted for the password of the mysql user.

To restore it, simply pipe it back into the mysql command:

mysql -u <user> -p -h <db-host> <database> < vkunja-backup.sql

PostgreSQL

To create a backup from PostgreSQL use the pg_dump command:

pg_dump -U <user> -h <db-host> <database> > vikunja-backup.sql

You might be prompted for the password of the database user.

To restore it, simply pipe it back into the psql command:

psql -U <user> -h <db-host> <database> < vikunja-backup.sql

For more information, please visit the relevant PostgreSQL documentation.

SQLite

To back up sqllite databases, it is enough to copy the [database file]({{< ref "config.md" >}}#path) to somewhere else.