PG backups
Will Adkin
will.adkin at lineal.co.uk
Mon Oct 25 14:04:20 UTC 2021
Thanks Doug & Bas
We've had our reasons for wanting to keep control in Omnis, I dont think we're ready to make any significant changes to that right now but I'll keep these ideas to one side .
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
On 25 Oct 2021, at 14:49, Doug Easterbrook <doug at artsman.com<mailto:doug at artsman.com>> wrote:
hi Will.
to be clear, pg_dump is not locking your machine. its the call to applescript to run it.
you cannot run pg_dump in a thread since its not an SQL command — its a terminal command, so its best to move the thinking into ‘how do I get terminal to do this for me, without omnis even being involved?’
For years, we used a batch script (happy to share it with you) that wer launched with a cron job on mac, and a recurring task on windows.
then you could
1) backup the database
2) also importantly, start a vacuum of the database to refresh the planner statistics.
while I did it with cron on mac (still available, after all these years), you could convert it to be run by launchctl
if you want the shell script, just let me know. it is well documented.
and, for interest, this looks like a reasonable tutorial to quickly turn a shell script into something that launchd can run.
https://www.maketecheasier.com/use-launchd-run-scripts-on-schedule-macos/
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978
On October 25, 2021, at 3:08 AM, Will Adkin <will.adkin at lineal.co.uk> 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
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list