How to backup pod with docker?

I know there is a help article for backing up your data, but it looks like the docker version would have some trouble with that.

For reference, I’m using @koehn’s docker image here.

Either way, it looks fairly straightforward. I just need to copy the public folder and dump the database. So I just need the password and all that which I should be able to get.

Is there anything else I would need to back up? For example the docker setup includes a redis database. Do I need that? Are there any other files or directories that should be backed up?

Thank you!

Edit: It looks like I got the database dump with docker exec pg_dump. Weirdly, I didn’t have to supply the database password. But I searched the dump and there are private posts in there, so it sure seemed to have worked. Should I be concerned?

All my other questions still stand. Is it really just this dump and the public folder or do I need more?

PostgreSQL may trust connections depending on their origin (specific user on local socket for example). I wouldn’t be very concerned.

public/uploads and the database are indeed the main things to backup, if config/oidc_key.pem is present then include that, config/initializers/secret_token.rb can’t hurt but shouldn’t be critical. I generally also find it useful to backup configuration files (config/diaspora.{toml,yml}, config/database.yml) for faster recovery.

Redis only contains volatile data, no need to back it up.

1 Like