ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Provide `scp` helper suggestions when use of `--ssh=<host>` writes to filesystem

Open danielbachhuber opened this issue 8 years ago • 4 comments

When you run a command with wp --ssh=<host>, any filesystem operations will happen on the remote file system (e.g. wp db export).

It would be helpful to provide a suggested scp command when we detect a filesystem write.

Originally https://github.com/wp-cli/wp-cli/issues/3162

danielbachhuber avatar Jan 03 '17 13:01 danielbachhuber

This may be a separate issue, but a use case I'd love to see covered is wp @staging import <local-wxr-files>. Basically the ability to take local WXR files and import them to a remote server.

This is what I imagined https://github.com/wp-cli/wp-cli/issues/3162 would enable, so if this is the replacement is this something that would be possible as part of this task, or should this be a separate issue, or is this not something that will be possible at all?

jjeaton avatar Jan 10 '17 19:01 jjeaton

This may be a separate issue, but a use case I'd love to see covered is wp @staging import <local-wxr-files>

This sounds like the same concept, but in the other direction. On the object of implementation though, how would WP-CLI determine whether the user means a file on the local filesystem vs a file on a the remote filesystem?

danielbachhuber avatar Jan 10 '17 19:01 danielbachhuber

Yeah, that would be the tough part. :) It may need to be a separate command, or a flag that indicates whether any file parameters are remote vs local?

jjeaton avatar Jan 11 '17 14:01 jjeaton

how would WP-CLI determine whether the user means a file on the local filesystem vs a file on a the remote filesystem?

PHP filesystem wrappers? E.g.: file://, https://, sftp:// etc.?

tedmasterweb avatar Jan 20 '17 10:01 tedmasterweb