Hooks for Bench Update

Our challenge is to keep the database and files in our local development environments synced with our production server running frappe-bench and serving our website.

I was wondering if it would be possible to add something like the concept of a ‘hook’ to the frappe bench. What my goal is would be to run a shell script that logs into our server, creates a sql backup, scp it to my local environment and do a restore. So I would want to run a command like bench update --sync which then would add the sync hook which would be the shell script to download and do all that stuff before bench migrates the site.

Just a thought @kickapoo

4 Likes