Where are the docker images or Discourse backup packages?


(xiasummer) #1

I want to download the backup packages directly from the SSH kernel.

Could you please tell me where to find the image or packages?

Yours.


The backup package is in

/var/discourse/shared/standalone/backups/default/

File Name like

-2017-08-05-043817-v20170731030330.tar.gz

Just download the backupfile.



(xiasummer) #2

Actually, I just misdeleted one of my docker images!!! Could anyone tell me if there is a way to backup the image?

God, help me!


(Eli the Bearded) #3

The docker image stores the software, not the data. You can rebuild the docker image with the launcher: ./launcher rebuild app


(xiasummer) #4

I know.

I now see there being a docker image at
local_discourse/app

How can I just download the file?

Or how can I just down load the “discourse/base” file?


(Eli the Bearded) #5

What is the goal here?

Backups of your forum you’ve found in shared directory. If you want to take a backup of the whole system, probably doing that on the VPS level (eg, Digital Ocean backup) is a better idea.


(xiasummer) #6

Good idea. But I use Ramnode, and Ramnode seems not having such functions.

You see, we can save the backup of the forum using the forum back on webpage.

While I want to know if there being some method not using the webpage but directly download the backup package from SSH?


(Eli the Bearded) #7

Well, a docker image is not a single file as installed on a system. You can get docker to make a single stream of an image, which can be saved as a file.

docker image ls

See the images installed.

docker image save IMAGENAME | gzip > NAME.gz

Save the image named IMAGENAME to NAME.gz

zcat NAME.gz | docker image load

Restore an image from a file.


(Jay Pfaffman) #8

What I backup is the backup files and the app.yml file. That’s enough to rebuild on another server.


(xiasummer) #9

O, I think there’s almost nothing to do with the app.yml. A forum contains a lot of files, that’s the most valuable thing, do remember to keep the backups.


(Jay Pfaffman) #10

App.yml has all of the configuration (plugins and mail config). If you have that, then you can rebuild your Discourse container on any server.


(xiasummer) #11

ooooooops, I think you still don’t know what I’m saying.

You can rebuild an empty discourse——so, what?

You have to rebuild the discourse and fill in all the former posts to it.

A forum is a data bank. The data is very important.


(Eli the Bearded) #12

Ah, yes, but the files for the forum are not stored in the docker image. The set-up is designed so that you can completely remove the docker image and put a new one in without losing your posts and uploads. The files under /var/discourse/shared/ are made visible to the processes inside the container and in that way the Postgres database and the uploads are retained between rebuilds.

That is why I asked about the intention above:


(Darren) #13

All your users, posts and settings configured in the admin interface are stored in the database file that is included in the backup. You don’t need to backup the docker images as they are not changed in any way.

In the same way as you don’t need to make a backup copy of excel in order to use your spreadsheets. At any time if you have a problem with excel you just re-install it and carry on using your spreadsheets. If anything goes wrong with your discourse installation you can just re-install it and it will use the database files that are already there, or if your whole system is broken and you have to start again on a new system you just restore one of the backup files onto a newly installed blank system.