There are different ways to configure backups for your controller, however we recommend the following:
Database backups can be taken manually at anytime by running cstacks database-backup
. This will created a compressed backup under /var/lib/computestacks/backups
.
To restore a backup, cd
to the backup directory and run gzip -d <filename> && psql cloudportal < <filename-without-gz>
.
For example, if the database backup is: cloudportal-20200617-0940_53.sql.gz
, then you would run:
<aside> 🚨 I don't recommend copy/pasting the entire block below and running it. Instead, copy each line one-by-one and run it to make sure it's successful.
</aside>
docker stop portal
dropdb cloudportal && createdb cloudportal
gzip -d cloudportal-20200617-0940_53.sql.gz && psql cloudportal < cloudportal-20200617-0940_53.sql
cstacks upgrade && cstacks run
This will:
psql
)cloudportal
database