You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Drush command archive:dump can't handle filenames longer than 100 characters
To Reproduce
My /config/sync/ folder contains files with names longer than 100 characters. Mainly migration files like : migrate_plus.migration.upgrade_d7_metatag_field_instance_widget_settings_node_xxxxxxx_xxxxxxxxxxxxx.yml
When executing ddev drush archive:dump --code --db --destination=../backups/archive.tar.gz
it fails, saying that some filenames are too long for the tar format.
Expected behavior
I excpect the archive:dump command to handle filenames longer than 100 characters.
Actual behavior
It fails creating the tar file, and outputs this :
In ArchiveDumpCommands.php line 172:
tar-based phar "/tmp/archive.tar" cannot be created, filename "code/config/sync/migrate_plus.migration.upgrade_d7_metatag_field_inst
ance_widget_settings_node_xxxxxxx_xxxxxxxxxxxxx.yml" is too long for tar file format
Failed to run drush archive:dump --code --db --destination=../backups/archive.tar.gz: exit status 1
Workaround
Maybe archive:dump should allow to use an alternative to the tar/PharData solution. I don't know if generating directly a zip file is something doable.
System Configuration
Q
A
Drush version
12.5.1
Drupal version
10.2.5
PHP version
8.2.11
OS?
Windows, WSL2, DDEV
The text was updated successfully, but these errors were encountered:
This is a limitation of the tar format. The filename part can only be 100 characters long, and the entire path can only be 255 characters long. We would have to switch to a different archive format, as suggested, if we wanted to support this. To preserve backwards compatibility, this switch would have to be an option.
@greg-1-anderson Actually it seems that the limitation is not on the tar format itself. I succedeed in generating a tar directly from a Linux shell with filenames longer than 100 characters. The limitation seems to be on the PHP PharData side.
Describe the bug
The Drush command
archive:dump
can't handle filenames longer than 100 charactersTo Reproduce
My /config/sync/ folder contains files with names longer than 100 characters. Mainly migration files like : migrate_plus.migration.upgrade_d7_metatag_field_instance_widget_settings_node_xxxxxxx_xxxxxxxxxxxxx.yml
When executing
ddev drush archive:dump --code --db --destination=../backups/archive.tar.gz
it fails, saying that some filenames are too long for the tar format.
Expected behavior
I excpect the
archive:dump
command to handle filenames longer than 100 characters.Actual behavior
It fails creating the tar file, and outputs this :
The limitation seems to come from Php's PharData that drush is using to generate the tar : https://stackoverflow.com/questions/24800217/phardata-limitation-of-file-name-length
Workaround
Maybe archive:dump should allow to use an alternative to the tar/PharData solution. I don't know if generating directly a zip file is something doable.
System Configuration
The text was updated successfully, but these errors were encountered: