Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup not backing up archives, evidence, templates #373

Open
domwhewell-sage opened this issue Dec 21, 2023 · 4 comments
Open

Backup not backing up archives, evidence, templates #373

domwhewell-sage opened this issue Dec 21, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@domwhewell-sage
Copy link

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

  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/
  2. Take a copy of .env to keep the admin passwords etc.
  3. Take a copy of the ssl/ folder
  4. 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

@domwhewell-sage domwhewell-sage added the bug Something isn't working label Dec 21, 2023
@chrismaddalena chrismaddalena added enhancement New feature or request and removed bug Something isn't working labels Jan 2, 2024
@chrismaddalena
Copy link
Collaborator

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").

@domwhewell-sage
Copy link
Author

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.

Copy link

github-actions bot commented Jun 4, 2024

This issue has been labeled as stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jun 4, 2024
Copy link

This issue is closed because it has been inactive for 14 days since being labeled stale. Feel free to re-open the issue with a comment. If this needs further discussion (e.g., a feature request), it might be better to open a topic under the Discussions tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants