-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add import command #345
base: master
Are you sure you want to change the base?
Add import command #345
Conversation
This makes it easy to import a Altis Dashboard backup into the local server. There's a few ways this could also be done: - In HM CLI / Node etc - In the cloud module - In a shared place where chassis can make use of it. All that is true, but I thought I'd start somewhere, as I had to continually import different backups so why not push it up!
Has a couple todo's still, but I thought I'd get thoughts from @roborourke on the approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this could be wholesale lifted and shifted into the https://github.com/humanmade/altis-dev-tools-command repo given the use of $this->getApplication()
. That command has a wrapper for running the exec command on either local server or local chassis with the --chassis
flag.
So with this I would need to be able to get the export URL from the Altis dashboard - I don't think client devs have access to those necessarily so I'd be keen for us to solve that first before we roll this out in a stable release.
I'm happy with the approach on the whole, we don't have to wait for Altis/HM CLI, especially given that Altis/HM CLI could just run this command under the hood if we did abstract it.
Definitely good to get features to devs sooner than later though.
Does this deal with uploads too? Depending on the dev environment it would require running composer server import-uploads
too to get them into the S3 container.
], | ||
] ), $output ); | ||
|
||
$elasticpress_index = $cli->run( new ArrayInput( [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have the wp altis migrate
command now but that's technically not required, just wondering if we can trigger everything hooked onto the multisite-install
command instead, without actually running that command!
Cool, I wasn't sure if
All "User" and above get to read backups, see https://github.com/humanmade/vantage-backend/blob/staging/content/mu-plugins/hm-stack-api/inc/endpoints/class-backups-endpoint.php#L21. You just right click on the backup "export" and Copy URL
Yes, I didn't do uploads yet, but needs to be added.
Hmm yeah I'm not sure. If I import a product database, maybe I want to be able to test the |
That's a really good point. A terse command name is ideal though so not something I want to bikeshed, perhaps in future if there are more command line interactions with cloud it can go under a namespace like |
Kinda related, it would be very nice to be able to get an export of the analytics data, and import that locally too. No idea how feasible that is. Perhaps in our backups we could also start putting the ES analytics data in the export... stretch goal n all, but would make it a lot easier to work with analytics stuff if you could pull it from production to local.
|
There is the export endpoint but requires authentication, additionally that could add up to 1.5gb of data a day in some cases, with 90 indexes that’s masses of data, and potentially personally identifiable data too. Would be best to have some redaction tools in place for any local env commands |
Looking at this again - it is a good point. Could argue it either way but we're going to deprecate Local Chassis so that's not a blocker for this any more. This will be a nice short term helper until we can make time to work on Altisifying HM CLI. I'll write up an issue so it can be picked up, updated and planned into a sprint. |
@joehoyle think we can pick this back up again, Local Chassis is officially removed now |
This makes it easy to import a Altis Dashboard backup into the local server.
There's a few ways this could also be done:
All that is true, but I thought I'd start somewhere, as I had to continually import different backups so why not push it up!