Skip to content

Instantly share code, notes, and snippets.

@antoinekociuba
Created August 3, 2014 12:57
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save antoinekociuba/0cfb05439ebe3ff423f3 to your computer and use it in GitHub Desktop.
Save antoinekociuba/0cfb05439ebe3ff423f3 to your computer and use it in GitHub Desktop.
Command to Tar Magento media folder, excluding unwanted files/folders. This command needs to be run on your magento installation root folder.
tar -zcvf var/backups/media_$(date +%d%m%Y).tar.gz --exclude-vcs --exclude='*cache*' --exclude='captcha' --exclude='wysiwyg/.thumbs' --exclude='tmp' --exclude='import' --exclude='export' --exclude='js' --exclude='js_secure' --exclude='css' --exclude='css_secure' media/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment