Tue 28 Apr 2020 3:09PM

Error during Backup - Getting "Permission Denied" for pg dump outputfile.

G Giuseppe Public Seen by 41


I tried to do some automated backups from my loomio instance.
It seems, that the backup script is packaging some stuff into a .tgz file.

But I get a "Permission denied" message at the beginning of the command execution ...

Is this a problem? Why it is giving me "permission denied?"

gmt@bogus:~/loomio-deploy$ sudo scripts/create_backup .

writing database dump: /pgdumps/loomio_production.dump

pgdump: [custom archiver] could not open output file "/pgdumps/loomioproduction.dump": Permission denied

writing backup file: ./backups/bogus-0.tgz././import/



Fabio dos Santos Sun 2 Aug 2020 10:47PM

I got the same problem.

I'm actually trying to figure out what the best way to backup our AGM and still have all the discussion available in the future..

I need to turn our Linode OFF, with the purpose of lowering costs. This means that I need a copy of all the discussion but also to be able to rescue it at any point in the future.

I thought of trying to download the whole debian image (25gb), Or making a linode image (13gb). But this seems wasteful: 1) Loomio is changing relatively fast. 2) I don´t really need an underlying operating system. This the whole point of docker, right? 3) If I can keep just the database information and the user information, and restore the information in future versions of loomio, that would be more than enough, right?

So the backup information in Loomio-deploy only talks about the automatic script, but there is no mention about how to restore the information.

And we are running into this trouble running the script.

Any insight?

PS: Our non-profit ran a very successful discussion and AGM with Loomio. Thank you so much for your patience and hard work. I can´t thank you enough for all the work, and making it available as Free Software. Please share our success with us, @Rob Guthrie and Loomio team!

PPS: I did find a link that details how to export a group and import the data back to a new installation. So I´m also wondering what the diference is also! Here is the information about exports: DATA EXPORT


Robert Guthrie Mon 3 Aug 2020 12:15AM

Great to hear you had success. Maybe we can connect you with our blog writer to make a story about it?

In terms of saving the data..well you can export discussions as printable PDF's or html pages, and you can export your group data as JSON, so in the future you can just import that group data into a new loomio install. Only thing is file attachments won't be saved that way.

The ultimate is export the JSON (from the group -> settings page) and save the files/ directory from your loomio install as a zip file, and save the html or pdf renders of the threads somewhere, depending on how many there are.


Fabio dos Santos Mon 3 Aug 2020 12:42AM

In that case, what is the purpose of the backup script? Would it be more interesting that the backup script generate the same JSON files that can be generated through the interface?

From what I understood, the create_backup script generates a copy of loomio-deploly directory, followed by a PGDUMP from the database, right? But that process is failing… Would that be a better alternative?


Robert Guthrie Mon 3 Aug 2020 12:49AM

the backup script is intended as a nightly event to ensure you have an "offsite" copy of your data, so that if you lose the server, you can restore it, files, users, groups and all.

The group export is for taking a copy of your group, and moving it between an established server and a new one... or putting your group on ice, and not managing a server for a while, then bringing it back to life on a new server.