terminus icon indicating copy to clipboard operation
terminus copied to clipboard

`terminus drush archive-dump` command fails to include files

Open vinmassaro opened this issue 10 months ago • 0 comments

Platform

(x) MacOS ( ) Linux ( ) WSL2

Installed Via

(x) Homebrew ( ) Apt Package ( ) Manually

PHP Version

( ) 7.4x ( ) 8.0 (x) 8.1

Terminus Version

3.4.0

Drush version in pantheon.yml

drush_version: 8

Command Executed

terminus drush $site.$env -- archive-dump

Expected behavior

Complete without warnings and includes uploaded site files as well as other files in /sites/default

Actual behavior

Command runs and throws warning "Unable to determine sites directory for self". The command completes, but the generated dump file is missing the /sites/default/files directory, as well as other PHP files in /sites/default. The only one included is /sites/default/default.settings.php. Example verbose output below with site info redacted:

$ terminus drush "$SITE_SOURCE".live -- archive-dump -vvv
Drush preflight prepare loaded autoloader at                         [preflight]
/opt/pantheon/drush/vendor/autoload.php [0 sec, 3.13 MB]
Starting Drush preflight. [0 sec, 3.13 MB]                           [preflight]
Loading drushrc "/opt/pantheon/drush/drushrc.php" into "drush" scope.[bootstrap]
[0.01 sec, 3.43 MB]
Loading drushrc "/.drush/drushrc.php" into "home.drush" scope. [0.01 [bootstrap]
sec, 3.43 MB]
Include /opt/pantheon/drupal-extensions [0.01 sec, 3.43 MB]             [notice]
Cache HIT cid: 8.4.12-commandfiles-0-e43be3d0774b0d1371ec6aaacc68fc5a    [debug]
[0.01 sec, 3.46 MB]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.03        [debug]
sec, 6.37 MB]
Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.03      [debug]
sec, 6.37 MB]
Scanning into /opt/pantheon/drush/includes/.. for                        [debug]
/.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 6.37 MB]
Scanning into /opt/pantheon/drush/includes/.. for                        [debug]
/self\.alias\.drush(8|)rc\.php$/ [0.04 sec, 6.37 MB]
Scanning into //.drush for /.*aliases\.drush(8|)rc\.php$/ [0.05 sec,     [debug]
6.37 MB]
Scanning into //.drush for /self\.alias\.drush(8|)rc\.php$/ [0.05        [debug]
sec, 6.37 MB]
Scanning into /code/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.05    [debug]
sec, 6.37 MB]
Scanning into /code/../drush for /self\.alias\.drush(8|)rc\.php$/        [debug]
[0.05 sec, 6.37 MB]
Scanning into /code/drush for /.*aliases\.drush(8|)rc\.php$/ [0.05       [debug]
sec, 6.38 MB]
Scanning into /code/drush for /self\.alias\.drush(8|)rc\.php$/ [0.05     [debug]
sec, 6.38 MB]
Scanning into /code/sites/all/drush for                                  [debug]
/.*aliases\.drush(8|)rc\.php$/ [0.05 sec, 6.38 MB]
Scanning into /code/sites/all/drush for                                  [debug]
/self\.alias\.drush(8|)rc\.php$/ [0.05 sec, 6.38 MB]
Scanning into /code/sites/[redacted] for                  [debug]
/.*aliases\.drush(8|)rc\.php$/ [0.05 sec, 6.38 MB]
Scanning into /code/sites/[redacted] for                  [debug]
/self\.alias\.drush(8|)rc\.php$/ [0.05 sec, 6.38 MB]
Bootstrap to phase 0. [0.08 sec, 8.86 MB]                            [bootstrap]
Bootstrap to phase 2. [0.08 sec, 8.86 MB]                            [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.08 sec, 9.22 MB]  [bootstrap]
Initialized Drupal 7.98 root directory at /code [0.09 sec, 9.23 MB]  [bootstrap]
Find command files for phase 1 (max=2) [0.09 sec, 7.54 MB]               [debug]
Cache HIT cid: 8.4.12-commandfiles-1-1c60c9218abb8ae175bdc7363b569450    [debug]
[0.09 sec, 7.55 MB]
Cache HIT cid:                                                           [debug]
8.4.12-annotationfiles-1-fed6bcb1e4cefdeabef4cecaebb456df [0.09 sec,
7.55 MB]
Drush bootstrap phase : bootstrap_drupal_site() [0.09 sec, 7.55 MB]  [bootstrap]
Initialized Drupal site [redacted] at sites/default   [bootstrap]
[0.09 sec, 7.55 MB]
Find command files for phase 2 (max=2) [0.09 sec, 7.55 MB]               [debug]
Cache MISS cid:                                                          [debug]
8.4.12-install_profile-66ecfeb9791a023150773849f1550c5d [0.09 sec,
7.55 MB]
Cache HIT cid: 8.4.12-commandfiles-2-cf0f7ad5efcad5ef5eb8165df82af131    [debug]
[0.09 sec, 7.57 MB]
Cache HIT cid:                                                           [debug]
8.4.12-annotationfiles-2-bb68de709984a611c98843dc73665deb [0.18 sec,
10 MB]
Found command: archive-dump (commandfile=archive) [0.18 sec, 10 MB]  [bootstrap]
Calling hook drush_archive_dump [0.22 sec, 13.43 MB]                     [debug]
Cache MISS cid: 8.4.12-alias-path--62ae811b905700784d8a3594ede9dd4b      [debug]
[0.22 sec, 13.43 MB]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.22        [debug]
sec, 13.43 MB]
Scanning into /etc/drush for /.*\.alias\.drush(8|)rc\.php$/ [0.22        [debug]
sec, 13.43 MB]
Scanning into /opt/pantheon/drush/includes/.. for                        [debug]
/.*aliases\.drush(8|)rc\.php$/ [0.22 sec, 13.43 MB]
Scanning into /opt/pantheon/drush/includes/.. for                        [debug]
/.*\.alias\.drush(8|)rc\.php$/ [0.23 sec, 13.44 MB]
Scanning into //.drush for /.*aliases\.drush(8|)rc\.php$/ [0.24 sec,     [debug]
13.44 MB]
Scanning into //.drush for /.*\.alias\.drush(8|)rc\.php$/ [0.24 sec,     [debug]
13.44 MB]
Scanning into /code/drush for /.*aliases\.drush(8|)rc\.php$/ [0.24       [debug]
sec, 13.44 MB]
Scanning into /code/drush for /.*\.alias\.drush(8|)rc\.php$/ [0.24       [debug]
sec, 13.44 MB]
Scanning into /code/sites/all/drush for                                  [debug]
/.*aliases\.drush(8|)rc\.php$/ [0.24 sec, 13.44 MB]
Scanning into /code/sites/all/drush for                                  [debug]
/.*\.alias\.drush(8|)rc\.php$/ [0.24 sec, 13.44 MB]
Scanning into /code/sites/default for /.*aliases\.drush(8|)rc\.php$/     [debug]
[0.24 sec, 13.44 MB]
Scanning into /code/sites/default for /.*\.alias\.drush(8|)rc\.php$/     [debug]
[0.24 sec, 13.44 MB]
Scanning into /code/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.24    [debug]
sec, 13.44 MB]
Scanning into /code/../drush for /.*\.alias\.drush(8|)rc\.php$/ [0.24    [debug]
sec, 13.44 MB]
Scanning into /code/sites/[redacted] for                  [debug]
/.*aliases\.drush(8|)rc\.php$/ [0.24 sec, 13.44 MB]
Scanning into /code/sites/[redacted] for                  [debug]
/.*\.alias\.drush(8|)rc\.php$/ [0.24 sec, 13.44 MB]
Backend invoke: /php/php /opt/pantheon/drush/drush.php --php=/php/php  [command]
 --backend=2 --verbose --debug --root=/code
--uri=[redacted]  sql-conf   --all 2>&1 [0.24 sec,
13.45 MB]
/php/php /opt/pantheon/drush/drush.php --php=/php/php  --backend=2      [notice]
--verbose --debug --root=/code --uri=[redacted]
sql-conf   --all 2>&1 [0.24 sec, 13.45 MB]
Calling chdir(/) [0.49 sec, 13.48 MB]                                    [debug]
Executing: tar  --exclude "code/sites" --dereference -cf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar code
Calling chdir(/code) [2.13 sec, 13.48 MB]                                [debug]
Calling chdir(/) [2.13 sec, 13.48 MB]                                    [debug]
Executing: tar  --dereference -rf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar code/sites/all
Calling chdir(/code) [20.88 sec, 13.48 MB]                               [debug]
Calling chdir(/) [20.88 sec, 13.48 MB]                                   [debug]
Executing: tar --dereference -rf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar code/sites/README.txt
Calling chdir(/code) [21.29 sec, 13.48 MB]                               [debug]
Calling chdir(/) [21.29 sec, 13.48 MB]                                   [debug]
Executing: tar --dereference -rf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar code/sites/example.sites.php
Calling chdir(/code) [21.6 sec, 13.48 MB]                                [debug]
sql-query: SHOW TABLES; [21.6 sec, 13.6 MB]                             [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_M4MLPm --database=pantheon --host=dbhost --port=6033 --silent  < /tmp/drush_S5KE92
  _pantheon_heartbeat
  _pt_heartbeat
  actions
  advanced_help_index
  authmap
  batch
  block
  block_custom
  block_node_type
  block_role
  blocked_ips
  cache
  cache_admin_menu
  cache_block
  cache_bootstrap
  cache_features
  cache_feeds_http
  cache_field
  cache_filter
  cache_form
  cache_image
  cache_libraries
  cache_location
  cache_menu
  cache_page
  cache_path
  cache_rules
  cache_token
  cache_update
  cache_variable
  cache_views
  cache_views_data
  captcha_points
  captcha_sessions
  cas_login_data
  cas_user
  ckeditor_input_format
  ckeditor_settings
  comment
  config_builder
  config_builder_index
  context
  css_injector_rule
  ctools_css_cache
  ctools_object_cache
  custom_breadcrumb
  d8cache_cache_tags
  date_format_locale
  date_format_type
  date_formats
  delta
  draggableviews_structure
  ds_field_settings
  ds_fields
  ds_layout_settings
  ds_vd
  ds_view_modes
  fe_block_boxes
  feeds_importer
  feeds_item
  feeds_log
  feeds_push_subscriptions
  feeds_source
  field_collection_item
  field_collection_item_revision
  field_config
  field_config_instance
  field_data_body
  field_data_comment_body
  field_data_field_address
  field_data_field_bio
  field_data_field_calendar_tags
  field_data_field_contact_name
  field_data_field_date
  field_data_field_department
  field_data_field_division
  field_data_field_email
  field_data_field_essays_text
  field_data_field_event_image
  field_data_field_event_time
  field_data_field_fax_number
  field_data_field_firstname
  field_data_field_header_image
  field_data_field_home_image
  field_data_field_image_link
  field_data_field_issue_image
  field_data_field_issue_upload
  field_data_field_lastname
  field_data_field_link_to_external_story
  field_data_field_location
  field_data_field_news_image
  field_data_field_phone
  field_data_field_right_body
  field_data_field_season_year
  field_data_field_slideshow_image
  field_data_field_title
  field_data_field_website
  field_group
  field_revision_body
  field_revision_comment_body
  field_revision_field_address
  field_revision_field_bio
  field_revision_field_calendar_tags
  field_revision_field_contact_name
  field_revision_field_date
  field_revision_field_department
  field_revision_field_division
  field_revision_field_email
  field_revision_field_essays_text
  field_revision_field_event_image
  field_revision_field_event_time
  field_revision_field_fax_number
  field_revision_field_firstname
  field_revision_field_header_image
  field_revision_field_home_image
  field_revision_field_image_link
  field_revision_field_issue_image
  field_revision_field_issue_upload
  field_revision_field_lastname
  field_revision_field_link_to_external_story
  field_revision_field_location
  field_revision_field_news_image
  field_revision_field_phone
  field_revision_field_right_body
  field_revision_field_season_year
  field_revision_field_slideshow_image
  field_revision_field_title
  field_revision_field_website
  file_managed
  file_usage
  filter
  filter_format
  flexslider_optionset
  flood
  fontyourface_font
  fontyourface_tag
  fontyourface_tag_font
  history
  image_effects
  image_styles
  job_schedule
  linkchecker_block_custom
  linkchecker_comment
  linkchecker_link
  linkchecker_node
  location
  location_country
  location_instance
  menu_custom
  menu_links
  menu_router
  node
  node_access
  node_comment_statistics
  node_revision
  node_type
  nodequeue_nodes
  nodequeue_queue
  nodequeue_roles
  nodequeue_subqueue
  nodequeue_types
  page_title
  pathauto_state
  queue
  rdf_mapping
  redirect
  registry
  registry_file
  role
  role_permission
  rules_config
  rules_dependencies
  rules_tags
  rules_trigger
  search_dataset
  search_index
  search_node_links
  search_total
  semaphore
  sequences
  sessions
  shortcut_set
  shortcut_set_users
  system
  taxonomy_index
  taxonomy_term_data
  taxonomy_term_hierarchy
  taxonomy_vocabulary
  url_alias
  users
  users_roles
  variable
  views_display
  views_view
  watchdog
  webform
  webform_component
  webform_conditional
  webform_conditional_actions
  webform_conditional_rules
  webform_emails
  webform_last_download
  webform_roles
  webform_submissions
  webform_submitted_data
  zipcodes
Calling system(mysqldump --defaults-extra-file=/tmp/drush_onevwr  pantheon --host=dbhost --port=6033 --no-autocommit --single-transaction --opt -Q  > /tmp/drush_tmp_1714069807_662aa12f47efd/pantheon.sql);
Database dump saved to                                               [success]
/tmp/drush_tmp_1714069807_662aa12f47efd/pantheon.sql [23.36 sec,
13.63 MB]
Calling chdir(/tmp/drush_tmp_1714069807_662aa12f47efd) [23.36 sec,       [debug]
13.63 MB]
Executing: tar  --dereference -rf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar pantheon.sql
Calling chdir(/code) [23.69 sec, 13.61 MB]                               [debug]
Backend invoke: /php/php /opt/pantheon/drush/drush.php --php=/php/php  [command]
 --backend=2 --verbose --debug --root=/code
--uri=[redacted]  core-status 2>&1 [23.69 sec, 13.62
MB]
/php/php /opt/pantheon/drush/drush.php --php=/php/php  --backend=2      [notice]
--verbose --debug --root=/code --uri=[redacted]
core-status 2>&1 [23.69 sec, 13.62 MB]
Unable to determine sites directory for self [24.29 sec, 13.66 MB]   [warning]
Calling chdir(/tmp/drush_tmp_1714069807_662aa12f47efd) [24.29 sec,       [debug]
13.67 MB]
Executing: tar --dereference -rf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar MANIFEST.ini
  tar: code/sites/default/default.settings.php: Not found in archive
  tar: Exiting with failure status due to previous errors
Calling chdir(/code) [24.59 sec, 13.67 MB]                               [debug]
Calling chdir(/) [24.59 sec, 13.67 MB]                                   [debug]
Executing: tar -tf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar code/sites/default/default.settings.php
Calling chdir(/code) [24.71 sec, 13.67 MB]                               [debug]
Calling chdir(/) [24.71 sec, 13.67 MB]                                   [debug]
Executing: tar --dereference -vrf /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar code/sites/default/default.settings.php
  code/sites/default/default.settings.php
Calling chdir(/code) [25.02 sec, 13.67 MB]                               [debug]
Executing: gzip --no-name -f /tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar
/tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar.gz
Archive saved to                                                     [ok]
/tmp/archive-dump/20240425182945/pantheon.20240425_182946.tar.gz
[57.87 sec, 13.67 MB]
Returned from hook drush_archive_dump [57.87 sec, 13.63 MB]              [debug]
Command dispatch complete [57.87 sec, 13.42 MB]                         [notice]

vinmassaro avatar Apr 25 '24 18:04 vinmassaro