bucket-copy

0.3.0 • Public • Published

Bucket Copy

Copy Amazon S3 bucket objects to another bucket.

Install

npm install bucket-copy --save

Usage

 
var BucketCopy = require('bucket-copy');
var bucketCopy = BucketCopy.connect({
  key: 's3-key',
  secret: 's3-secret',
  srcBucket: 'name-of-the-s3-bucket',
  destBucket: 'name-of-the-s3-bucket'
});
 
 
// Copy the object(s)
 
bucketCopy('some_dirctory_in_a_bucket', function (err) {
  // All done and copied, unless you messed up
});
 
// OR
 
bucketCopy('some_dirctory_in_a_bucket', 'new_bucket_directory_prefix', function (err) {
  // All done and copied, unless you messed up
});
 

The directory prefix allows you to put the entire set of copied objects into a new root object when they are copied to the new bucket.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i bucket-copy

    Weekly Downloads

    1

    Version

    0.3.0

    License

    BSD

    Last publish

    Collaborators

    • scottcorgan