Automattic / team51-cli

A tool for provisioning and connecting GitHub repos, Pressable WordPress sites and DeployHQ.
MIT License
12 stars 0 forks source link

Add cross-site restore functionality to the team CLI #193

Open cagrimmett opened 1 year ago

cagrimmett commented 1 year ago

Pressable API: https://my.pressable.com/documentation/api/v1#site-cross-restores

Maybe something like this: team51 pressable:cross-restore --from=SITEID --to=SITEID --filesystem --database

--from and --to are necessary, and at least one of --filesystem or --database are required.

For extra protection, maybe fail if there is a domain mapped to the restore-to site?

After the restore (which will take some time depending on the site), we should do what we do for development site cloning: Set the environment variable to staging, then install SafetyNet as a mu-plugin.