Backup not backing up archives, evidence, templates
domwhewell-sage opened this issue · comments
Describe the bug
The ghostwriter-cli backup
command currently only backs up the postgres database.
To Reproduce
To transfer to another server, run these commands:
On Server 1
- Run
ghostwriter-cli backup
to backup the postgres database and download the.tar.gz
file from/var/lib/docker/volumes/ghostwriter_production_postgres_data_backups/_data/
- Take a copy of
.env
to keep the admin passwords etc. - Take a copy of the
ssl/
folder - Take a copy of
/var/lib/docker/volumes/ghostwriter_production_data/_data/
On Server 2
5. Upload the .env
file to the root of the Ghostwriter/
directory
6. Upload the ssl/
folder to the root of the Ghostwriter/
directory
7. Run ghostwriter-cli install
(Unsure if this is necessary as restoring data but did it anyway)
8. Upload the copy of the ghostwriter_production_data
from the old server to /var/lib/docker/volumes/ghostwriter_production_data/_data/
on this server
9. Upload the backup of the postgres database to /var/lib/docker/volumes/ghostwriter_production_postgres_data_backups/_data/
and run ghostwriter-cli restore
to restore the postgres database from the old server
Expected Behavior
The ghostwriter-cli backup
command should backup more of the required files than the postgres database and potentially place a copy in the current working directory rather than having to extract it from the /var/lib/docker/volumes/
folder
Screenshots
N/A
Server Specs:
N/A
Additional context
N/A
This is the intended behavior, but we can look into adding functionality to backup volume data. Ghostwriter CLI runs the PostgreSQL backup
command to create a SQL backup. It's possible to backup everything else, but the backups are stored in a volume right now. That will probably need to change. Restoring the volume data it will also require more work.
In the meantime, I'll update the help text to mention volume data is not backed up (current help text is: "Creates a backup of the PostgreSQL database").
Hi @chrismaddalena, that sounds good. My intention was to setup a weekly backup on our production server using the Ghostwriter CLI backup
command, and then move that backup off-site so in a worst case scenario I could rebuild the server.
The .env
and ssl/
files and folders should probably be left as optional for the user to manually take copy's as they are sensitive and possibly unique to their individual use case.
This issue has been labeled as stale
because it has been open for 30 days with no activity.