Unable to follow manual backup procedure

(Arve Knudsen) #1

I have attempted the manual method of creating and restoring a backup of my Docker based installation, but it is failing me. I’ve tried steps one and two, the first of which I could get to work with a slight modification (cd /var/discourse instead of cd /var/docker):

  1. If your old Discourse…
  • lives in a Docker container, enter it:
    cd /var/docker
    git pull
    sudo ./launcher enter app
    su - discourse
  • does not live in a Docker container, you should at this point ensure that the user you’re logged in as can use pg_sql to connect to Discourse’s production database and has access to the uploaded files. You may also have to adjust the directory and file names below.
  1. Export the database and uploaded files:
    pg_dump -xOf /shared/discourse-backup.sql -d discourse -n public
    gzip -9 /shared/discourse-backup.sql
    tar -czf /shared/discourse-uploads.tar.gz -C /var/www/discourse/public uploads

I gave up on step two though, since I don’t have the permission to write to /shared/discourse-backup.sql.

(Alan Tan) split this topic #2

2 posts were merged into an existing topic: Unable to restore backup

(Arve Knudsen) #4

BTW, this is a different bug than I reported in the other thread. It’s about the manual procedure not working.

(Régis Hanol) #5

Might I ask why are you trying to restore manually?

(Arve Knudsen) #6

Oh, just because the UI backup restoration is broken.

Shouldn’t the manual backup procedure work anyhow though?

(Régis Hanol) #7

That’s bad. We should fix it. What’s broken?

That procedure was written by a member of the community (as opposed to one of the developer) in 2014 and was last updated in November 2015. I personally haven’t tested it and there’s high chance it’s outdated and not working anymore…

(Arve Knudsen) #8

The UI restoration procedure has been fixed in the meantime, see the thread.

Regarding the manual procedure. Is there some way to make it clear that it’s out of date and unofficial? The reason I followed it was that it was hit #2 when googling for discourse and backup. To me it looked kosher enough.