PG backups

Bastiaan Olij bastiaan at muxworks.com.au
Mon Oct 25 10:25:19 UTC 2021


Hi Will,

I've always used pgAgent for this, this is a small tool that runs on the 
server and allows you to schedule various processes including backups on 
the server. These are configured through jobs.

The nice thing about it is that everything is managed in a small 
database on that same server. So after a little bit of reverse 
engineering of that database we found out how we can update the job with 
a query to kick it off. Similarly it doesn't take much to figure out how 
to query the state of the job and figure out when it's finished.

The great thing about this approach is that it just runs in a background 
task on the server. It frees up your users machine but also, it doesn't 
expose anything to your users.

If you want the user to have access to the backup you can always ensure 
that job saves the backup in a place accessible by the user.

Cheers,

Bas


On 25/10/2021 9:08 pm, Will Adkin wrote:
> Hi Omnis list
>
> With recent talk on Postgres security can I ask how people are managing Postgres backups from their Omnis apps?
>
> Currently we have a block of code that runs pgdump via an AppleScript call on Mac or by creating and launching a bat file on Windows, this can lock the system for a long time on our bigger databases - would love to be able to move this into an Omnis Worker, is it possible to run a postgres backup with a SQLWorker or Node.js Worker?
>
> Best regards
>
> Will
>
>
>
> [Lineal Software Solutions]        <http://www.lineal.co.uk>
>
> [Twitter]<https://twitter.com/linealsoftware>  [Facebook] <https://www.facebook.com/linealsoftware?fref=ts&ref=br_tf>   [Google +] <https://plus.google.com/112982815000763473226/about>   [LinkedIn] <https://www.linkedin.com/company/1859834?trk=tyah&trkInfo=clickedVertical%3Acompany%2Cidx%3A1-1-1%2CtarId%3A1437729256906%2Ctas%3Alineal%20s>
>
> [https://s3.amazonaws.com/htmlsig-assets/spacer.gif]
>
> Will Adkin  / Software Development Manager
> will at lineal.co.uk<mailto:will at lineal.co.uk>
>
> Lineal Software Solutions
> 01271 375999
> Commercial House, The StrandBarnstaple, Devon, EX31 1EU
> www.lineal.co.uk<http://www.lineal.co.uk>
>
>
>
> This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Lineal is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com

-- 
Kindest Regards,

Bastiaan Olij
bastiaan at muxworks.com.au
+61-432144833



More information about the omnisdev-en mailing list