Skip to main content

How to tar.tgz your local drupal 8 testing website

Now that "drush ard" is dead i was looking for a "compact - light" solution through the terminal. This is what i came up with, in order to dump archive the minimum amount of files and directories.

tar -zcf --exclude="vendor" --exclude="web/core" --exclude="web/modules/contrib" --exclude="web/modules/themes/custom/d8custom_theme/node_modules" -f d8localdev.25112020.tgz d8localdev 

where d8local is your /Users/pixelthis/www/d8local directory if you are using a default mamp installation for example. and d8custom_theme/node_modules is for excluding the npm packages in case your are using a theme that works with webpack.js or gulp etc. So in case you need to raise your localdev from the deads untar like this

tar -zxvf d8local.25112020.tgzz 

For Mac OSX I had to do

 tar -zcv --exclude='folder' -f theOutputTarFile.tar folderToTar


Note the -f after the --exclude=

terminal shell unix

Latest Articles

VSCode Drupal Coding Standards Setup (From Scratch) admin_pixelthi… Mon, 12/22/2025 - 16:01 VSCode Drupal Coding Standards Setup (From Scratch)

VSCode Drupal Coding Standards Setup (From Scratch)

vscode
Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file admin_pixelthi… Sun, 12/01/2024 - 16:49 Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

Using drupal/core-composer-scaffold to prevent rewriting .htaccess or robots.txt file

composer
Controlling ckeditor styling options with hook_editor_js_settings_alter admin_pixelthi… Thu, 05/16/2024 - 10:49 Controlling ckeditor styling options with hook_editor_js_settings_alter

Controlling ckeditor styling options with hook_editor_js_settings_alter

php hook hook_editor_js_settings_alter hook_field_widget_single_[WIDGET_TYPE]_form_alter