刘凡 9ff4d1d109 add S3,archive,truncate 2 anos atrás
..
.gitignore 9ff4d1d109 add S3,archive,truncate 2 anos atrás
LICENSE 9ff4d1d109 add S3,archive,truncate 2 anos atrás
README.md 9ff4d1d109 add S3,archive,truncate 2 anos atrás
file.conf 9ff4d1d109 add S3,archive,truncate 2 anos atrás
nastos3.py 9ff4d1d109 add S3,archive,truncate 2 anos atrás

README.md

NasMyCloudToS3

Python script to upload files and folders to Amazon S3 from NAS my Cloud EX4100 (Western Digital).

Advise

This script uses the binary called s3 which is included in the NAS EX4100 firmware. Don't use if you don't have this binary file.

Instructions
  1. Copy the files nastos3.py and file.conf to a directory in your NAS.
  2. Config file file.conf with your parameters. Here is a description:

    • bucket: The name of the bucket where you want upload the folder.
    • _accesskey: Your access key for the bucket.
    • _secretkey: Your secret key for the bucket.
    • _remotepath: To upload files inside a folder. If empty the upload process begin in the root of the bucket. Do not add slash at the beggining. Example: example/
    • _originpath: Origin path of the folder that you want upload. Do not add the final slash. Example: my/folder/that/i/want/upload
  3. Start the script with this command:

    python nastos3.py -i file.conf -l /path/to/log/mylog.log
    

    where:

    -i : Name of the .conf file. 
    -l : Path to the log file. Can be only the name of the log, in which case the log file are stored in the actual folder.
    
  4. And that is all.