diff --git a/docs/database.backup b/docs/database.backup new file mode 100644 index 0000000000..f1041d0dd7 --- /dev/null +++ b/docs/database.backup @@ -0,0 +1,16 @@ +# Datbase backups +When upgrading to new major version of Unleash it is advised to do a +full database backup to ease rollback in case of failures. + +1. Create a database backup: + +``` +pg_dump --clean -U unleash_user -W -h localhost unleash > unleash-db.dump + +``` + +2. Restore from a backup: + +``` +psql -U unleash_user -W -h localhost unleash < unleash-db.dump +```