docs: update backup instructions

This commit is contained in:
kolaente 2021-11-13 18:00:49 +01:00
parent cf05de19b3
commit 4829c89940
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -10,12 +10,17 @@ menu:
# What to backup # What to backup
Vikunja does not store any data outside of the database. There are two parts you need to back up: The database and attachment files.
So, all you need to backup are the contents of that database and maybe the config file.
{{< table_of_contents >}} {{< table_of_contents >}}
## MySQL ## 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: To create a backup from mysql use the `mysqldump` command:
@ -31,7 +36,7 @@ To restore it, simply pipe it back into the `mysql` command:
mysql -u <user> -p -h <db-host> <database> < vkunja-backup.sql mysql -u <user> -p -h <db-host> <database> < vkunja-backup.sql
{{< /highlight >}} {{< /highlight >}}
## PostgreSQL ### PostgreSQL
To create a backup from PostgreSQL use the `pg_dump` command: To create a backup from PostgreSQL use the `pg_dump` command:
@ -49,6 +54,6 @@ psql -U <user> -h <db-host> <database> < vikunja-backup.sql
For more information, please visit the [relevant PostgreSQL documentation](https://www.postgresql.org/docs/12/backup-dump.html). For more information, please visit the [relevant PostgreSQL documentation](https://www.postgresql.org/docs/12/backup-dump.html).
## SQLite ### SQLite
To backup sqllite databases, it is enough to copy the database elsewhere. To back up sqllite databases, it is enough to copy the [database file]({{< ref "config.md" >}}#path) to somwhere else.