-
Notifications
You must be signed in to change notification settings - Fork 34
Follow symlink directories for Jetpack backups #1448
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
Follow symlink directories for Jetpack backups #1448
Conversation
2b17c53
to
7ea8ef6
Compare
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.
This almost works as expected. I confirm the export includes/follow symlinks, but it's not excluding pathsToExclude
and I see the sqlite-database-integration
folder in the final zip.
I think we should remove the getSiteFiles but we can tackle that in a separate issue. I created STU-536.
if ( entry.name.includes( '.git' ) || entry.name.includes( 'node_modules' ) ) { | ||
return false; | ||
} |
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.
Let's also exclude the pathsToExclude.
Currently I see a regression where the sqlite-database-integration
mu-plugin is being exported.
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.
Maybe if mu-plugins is empty we avoid adding it too 🤔
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.
Good catch! I have excluded them as part of 51c1983.
Maybe if mu-plugins is empty we avoid adding it too 🤔
A nice side effect is that empty directories are automatically excluded, for example, now that pathsToExclude
filtering is applied, I cannot see either mu-plugins
or fonts
because they are empty in my site
I also thought about that and decided to suggest it as a follow-up, but you beat me to it 😄. Thank you very much for creating the task |
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.
Thanks for the update. It works great! Now the pathsToExclude paths are excluded, and the symlinks are resolved and included in the zip 👍 .
Before
export-with-symlinks-before.mp4
After
export-with-symlinks-after.mp4
…dio-sync-include-symlink-directories-to-the-jetpack
Related issues
Proposed Changes
archive.directory
instead ofarchive.file
for creating the Jetpack backup file so the symlinks can be followed. This works because of the following patch in archiver.Testing Instructions
Export
Push
Pre-merge Checklist