Hi,

Fieldteams will be sending data from Collect mobile program to the Open Foris Collect server at the office.

I like to make a scheduled backup on the office server. Can I script backup/export of data from Open Foris Collect server or should I go with a PostgreSQL database and script the database backup?

Regards /Mikael

asked 21 Feb '22, 12:21

OpenF_mho's gravatar image

OpenF_mho
111
accept rate: 0%


Dear Mikael,
It would be better and faster to schedule backups of the PostgreSQL database.
You should create a user on the DB that has only read rights on the collect schema, run pg_dump in a cron task to take scheduled backups (if you are running Collect on a Linux machine).
You could write something like this in the crontab to take daily backups:

0 0 * * * pg_dump -U db_user_name collect > /bck/collect/collect_$(date +\%Y\%m\%d\%H\%M\%S).dump

(Replace db_user_name with the name of the user with read rights on the collect DB).
In this example, every day at midnight a dump of the database will be generated.
Also, don't forget that the uploaded pictures are stored by Collect in a folder of the file system (in Linux they will be under ~/OpenForis/Collect/data/collect_upload/, so take care of backing up even them.

I hope it could be useful, let us know, many thanks.
Open Foris Team

permanent link

answered 21 Feb '22, 23:09

Stefano%20%28OF%29's gravatar image

Stefano (OF) ♦♦
4.7k19
accept rate: 20%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×493

question asked: 21 Feb '22, 12:21

question was seen: 609 times

last updated: 21 Feb '22, 23:09