Recovery from $docker save

AI-generated summary

The discussion revolves around recovering a Discourse instance from a Docker backup created using docker save. brightrmn attempted to restore the instance but encountered an error and only had the Docker backup archive. Falco explained that docker save only stores the Docker image, not the data stored in mounted volumes, such as posts, users, and uploads. Unfortunately, brightrmn confirmed that they didn’t have any other backups, including the contents of /var/discourse/shared, which pfaffman inquired about. brightrmn was only able to recover logs by searching through the unzipped layers, and acknowledged the importance of making regular backups to prevent data loss.

Hi,
Please tell me how to restore the discourse with a backup of the docker backup.

docker save -o container-file-name.tar containername

When I try to rebuild it, I get it:

Already up-to-date.
I, [2019-06-11T20:14:10.852580 #14]  INFO -- : Loading --stdin
/pups/lib/pups/config.rb:23:in `initialize': undefined method `[]' for nil:NilClass (NoMethodError)
	from /pups/lib/pups/cli.rb:27:in `new'
	from /pups/lib/pups/cli.rb:27:in `run'
	from /pups/bin/pups:8:in `<main>'

I don’t have any other archives or backups, just this archive.
Please tell me where in this archive there is a database and related files.

That won’t work. docker save only stores the docker image, and all the stuff you want to backup (posts, users, uploads) are stored outside the image, in the mounted volumes.

I’m afraid you lost all data them :frowning:

Many thanks for the quick response, I will try to google cache.

Just to make sure. You don’t have the contents of

/var/discourse/shared

?

It was empty.
I unzipped all layers and searched with ack, my data, everything I found the logs.
Great lesson on why I need to make backups :slight_smile: