Skip to content

Instantly share code, notes, and snippets.

@craftyshaun
Last active October 8, 2025 09:02
Show Gist options
  • Select an option

  • Save craftyshaun/c91f7e5082b8c57a10291bc705c5a9c7 to your computer and use it in GitHub Desktop.

Select an option

Save craftyshaun/c91f7e5082b8c57a10291bc705c5a9c7 to your computer and use it in GitHub Desktop.
Obsidian - 2025-04-03 - Pawnit Onsite.md

Contents

Recent #client-pawnitsystems Notes

TABLE file.ctime as Created
FROM #client-pawnitsystems  
WHERE !contains(file.name, "Template")
SORT file.ctime desc

Tasks for Day

Pawnit Networking

  • Install ZeroTier on UTM

Odoo

  • Script to backup using the curl to the db backup endpoint.

https://handbook.coopdevs.org/ca/Odoo/Sysadmin/Add-Backups-To-Odoo-Instance

curl -X POST -F 'master_pwd=ptd2-da5d-uewx' -F 'name=OdooProd_Dev' -F 'backup_format=zip' -o odoo-dev-backup-`date -Iseconds`.zip http://localhost:8065/web/database/backup
curl -X POST -F 'master_pwd=ptd2-da5d-uewx' -F 'name=OdooProd_Dev' -F 'backup_format=zip' -F "backup_file=@$RESTORE_FILE" -F "neutralize_database=1"  http://localhost:8065/web/database/restore

#howto-odoo How do do do hiracheral structures:

AWS Cognito

  • Finish making the test user pool with simple user/pass
  • Find out how we link to draftbit

Mobile Push Notifications

  • Confirm the push method
    • SNS Based ??
      • SNS -> APNS
      • SNS -> Google
      • SNS -> Web
    • ~~Using another push / notification ag (check Raindrop)~~
  • Initial use in pawnit mobile

Preforming Odoo Backups

  1. SSH to the odoo host
  2. cd to /opt/docker/backups
  3. Run ./dump-prod.sh

This will make an adhoc backup with a file name like odoo-prod-backup-adhoc-2025-06-03T23:58:23+00:00.zip

This can then be restored across to dev using ./restore-dev.sh with the filename. So ./restore-dev.sh odoo-prod-backup-adhoc-2025-06-03T23:58:23+00:00.zip

The backup script is also called from CRON with a --scheduled flag that writes the backup and removes anything older than 7 days.

Crontab

cd /opt/docker/backups && dump-prod.sh --scheduled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment