This link shows a great backup script for OC written by Montri.
I’ve tested it and it works a treat. However there’s no restoration explanation. I’ve tried using PGadmin to try and restore the .db file the backup creates without success.
Thanks in advance.