-
Notifications
You must be signed in to change notification settings - Fork 167
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
Pulling between different folder structures #614
Comments
I just found out that this occurs when using ssh protocol, but it works as expected using ftp. |
Really cozy report! Thank you for the effort and for the report itself. I'll certainly force my schedule to take the time to look at this. |
Anything new on this ? |
While working on the new release, I wanted to investigate about this one and possibly remove a bug before going stable with 6.0 release. Unfortunately it was - and remains - a complex journey. And it would require a pamphlet in order to explain all the historical layers laying beneath. Let's try to have a rationale at least. First thing first: as it stands, wordmove does not support a different folder structure in local than in remote when using rsync+ssh. This is not documented and neither is documented the possibility to do such an operation; but I agree that it would be the expectation. I have reasons to think that this became a fact starting with 1642065, commit that changed a lot - too much I'd say - about the rsync behaviour we've behind the scenes, but fixed what I considered a bug. What was the problem which brought us to implement such a big change? The
and in exclude:
- wp-content/plugins/foo.php the exclusion wouldn't have been honored, because the rsync command was transferring
I thus needed to think a new approach in order to be able to compile exclusion list as expected and have rsync honoring what the user meant. What is the new approach doing? The very very simplified version is: wordmove tells rsync to always sync the
Sounds good, but why we should care about this thing? There is a counter effect emerging from this behaviour, and it's what makes actually impossible to manage different folder structure through rsync+ssh. We're telling rsync to sync the The result is that only symmetric dirtrees are actually supported. So what? I thought about what else I could invent to take all the pieces together and the only approach I could think about is this one:
Given a movefile local:
paths:
wp-content: app/
plugins: app/plugins/
production:
exclude:
- wp-content/plugins/my_plugin/
- /something.php and a remote dirtree
and a local dirtree
When the user When the user - my_plugin/
The simplified rsync command would be The missing thing from this picture is the programmatic transforming log while interpreting the exclude list. But I'm not completely happy with this approach... ...since dynamically interpreting exclusion string from the user would be a pain, given the numerous exclusion formats supported by rsync... Personally I'm not sure I could implement a 100% affordable algorithm. So what? (second take)? Literally IDK. Every thought welcome. And if necessary I'm ready to re-explain, dig more, reword my confused pamphlet :P |
Oh well... maybe a |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the bug
I'm a long time wordmove user, and today I'm facing an issue that I can't understand.
I'm trying to pull a site that has a different folder structure than my local site (local : bedrock ← production : vanilla WP). I specify the custom paths in each section to match the file structure of both sites, but the files are pulled in the same folders as the source site instead of going into the destination site custom folder structure.
My final goal is to convert a vanilla WP install to a Bedrock WP structure.
EDIT This occurs only when using ssh protocol, but works as expected when using ftp.
Wordmove command
wordmove pull -e production -u
Expected behavior
The files should be downloaded according to the folder structure defined in my
local
section.movefile.yml
Exception/trace
No errors
Environment (please complete the following information):
Doctor
wordmove doctor
is all greenI changed the movefile to fix the error and got all green, but it didn't fix the issue.
The text was updated successfully, but these errors were encountered: