Exclude .DS_Store and __MACOSX from backups

When doing development work on MacOS ( OS X for older systems ) .DS_Store files and __MACOSX folders are created by the OS. These have no affect on WordPress and often times will make themselves onto Production servers. Ideally there would be an option to exclude these from the .zip archives created. This option exists within the zip command as the exclude flag. So for example when zipping from the command line to exclude these two items you would use. `zip -r COMPRESSED_FILENAME.zip FOLDER_TO_COMPRESS -x “.DS_Store” -x “__MACOSX”`

twitterlinkedinFacebook

1 Comment

  1. udadmin

    In general, UpdraftPlus’ view is that if you put the file on the server, then you wanted it, so it will be backed up: making assumptions that the user has created files he doesn’t really want could be dangerous in a backup product used by millions of sites. You can implement an over-ride on your site to exclude unwanted files by using one of the options here: https://updraftplus.com/faqs/how-can-i-exclude-particular-filesdirectories-from-the-backup/ , particularly the filters.

Submit a Comment