AWS Import/Export
Developer Guide (API Version 2010-06-03)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Excluding Files and Directories

You can instruct AWS Import/Export not to import some of the directories and files on your storage device. This is a convenient feature that allows you to keep a directory structure intact, but avoid uploading unwanted files and directories. Use the ignore option to specify directories, files, or file types on your storage device to ignore. Use standard Java regular expressions to specify naming patterns. For information about Java regular expressions, go to http://download.oracle.com/javase/tutorial/essential/regex/. The following examples show Java regular expressions that are commonly used in a manifest.

Excluding Files

The following example uses the ignore option with two Java regular expressions to exclude files with suffix ending with a tilde and .swp.

ignore:
  -  .*~$ 
  -  .*\.swp$

The following ignore option excludes all the files on the storage device with the .psd extension.

ignore:  
  - \.psd$ 
  - \.PSD$          

The log report includes all ignored files, including the SIGNATURE file you added at the root of your storage device.

Excluding Directories

The following ignore option specifies that the backup directory at the root of your storage device will be excluded from the import.

ignore:
  - ^backup/

Important

When specifying a path that includes a file separator, for example, images/myImages/sampleImage.jpg, make sure to use a forward slash, “/”, and not a back slash.

The following ignore option ignores all the content in the images/myImages directory.

ignore: 
  - ^images/myImages/

Excluding Recycle Bin

Many storage devices include recycle bins. You may not want to upload the recycle bin in the import process. To skip the recycle bin on Windows computers you specify the following ignore option. The regular expression in the first line applies to NTFS file systems formatted for Windows Vista and Windows 7. The regular expression in the second line applies to NTFS file systems on Windows 2000, Windows XP and Windows NT. And the regular expression in the third line applies to the FAT file system.

ignore: 
  - ^\$Recycle\.bin/
  - ^RECYCLER/
  - ^RECYCLED/

Excluding Lost+Found

The Java regular expression in the following ignore statement prevents the lost+found directory from being uploaded.

ignore: 
  - ^lost\+found/