EasyManua.ls Logo

AWS Snowball - Page 69

AWS Snowball
166 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AWS Snowball User Guide
Using the Snowball Client
snowball cp [source path] [destination path]
When copying a directory, if you also want to copy the contents of the source directory, you use the -r
option to recursively copy the contents.
Syntax for Copying a File
Copying a file to a nonexistent destination with no trailing slash – Copies the source file to a new
file at the destination.
snowball cp /tmp/file1 s3://bucket-name/dir1/file2
In the preceding example, the source file file1 is copied to the Snowball with the new file name of
file2.
Copying a file to a nonexistent destination with a trailing slash – Creates a new directory at the
destination, and copies the file into that new directory.
snowball cp /tmp/file3 s3://bucket-name/dir2/
In the preceding example, the dir2 directory does not exist until this command is executed. Because
dir2/ has a trailing slash in this example, dir2 is created as a directory, and the path to file3 on the
Snowball is s3://bucket-name/dir2/file3.
Copying a file to an existing destination file – Fails unless you specify the -f option to overwrite the
existing destination file.
snowball cp -f /tmp/file4 s3://bucket-name/dir3/file5
In the preceding example, the destination file file5 already exists before the command was executed.
By executing this command with the -f option, file5 is overwritten by the contents of file4, with a
destination path of s3://bucket-name/dir3/file5.
Copying a file to an existing destination directory – Copies the file into the existing destination
directory.
snowball cp /tmp/file6 s3://bucket-name/dir4/
The preceding example copies file6 into s3://bucket-name/dir4/.
Note
If file6 already exists in s3://bucket-name/dir4/ when this command is executed, the
command fails. You can force the destination file6 to be overwritten by the source file6 by
using the snowball cp command with the -f option.
Copying a file to a bucket on Snowball with or without a trailing slash – Copies the file into the root
level directory on the Snowball that shares the name of an Amazon S3 bucket.
snowball cp /tmp/file7 s3://bucket-name
The preceding example copies file7 into s3://bucket-name/file7.
Note
If file7 already exists in s3://bucket-name when this command is executed, the command
fails. You can force the destination file7 to be overwritten by the source file7 by using the
snowball cp command with the -f option.
63

Table of Contents