EdgecaseInc/glacierUploader
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
_____ _ _____ _____ ______ _____
/ ____| | /\ / ____|_ _| ____| __ \
| | __| | / \ | | | | | |__ | |__) |
| | |_ | | / /\ \| | | | | __| | _ /
| |__| | |____ / ____ \ |____ _| |_| |____| | \ \
\_____|______/_/ \_\_____|_____|______|_|__\_\
__ _ _____ _ ____ _____ ____________
| | | | __ \| | / __ \ /\ | __ \| ____| __ \
| | | | |__) | | | | | | / \ | | | | |__ | |__) |
| | | | ___/| | | | | |/ /\ \ | | | | __| | _ /
| |__| | | | |___| |__| / ____ \| |__| | |____| | \ \
\____/|_| |______\____/_/ \_\_____/|______|_| \_\
Copyright (c) 2014 Sam Caldwell (sam@edgecase.io), Edge Case, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
===========================
Purpose:
===========================
This utility allows the user to upload files to Amazon Glacier via
python 2.7 via boto.
===========================
Usage (From commandline):
===========================
glacierUpload.py [-h] [--vault VAULT] [--key KEY] [--secret SECRET]
[--file FILE] [--description DESC]
[--inventory INVENTORY]
Arguments:
-h, --help Show this help message and exit
--vault VAULT AWS Glacier Vault
--key KEY AWS API Key Id (aws_awsKeyId)
--secret SECRET AWS secret (aws_secret_access_key)
--file FILE Path and filename (upload source)
--description DESC Optional description.
--inventory INVENTORY Inventory file where we track what is uploaded.
NOTE: If the vault name given does not exist, the script will create it
first.
===========================
Usage: (From Other Scripts):
===========================
import glacierUpload
glacierUpload.upload(
awsKeyId,
awsSecret,
awsVault,
fileName,
inventory,
description=None
)
===========================
Known Issues:
===========================
(0) We currently can only archive TEXT files (e.g. mongo dumps in JSON) and not
binary files. This is due to an open issue with Python 2.7 (see
http://bugs.python.org/issue12398)
(1) Be sure your system clock is synchronized. Failure to sync the system
clock will encounter a "Signature expired" message. For Linux systems, it
is suggested that using ntpdate to synchronize the clock is a simple
solution. In Debian, this is done by executing--
sudo apt-get install ntpdate -y
ntpdate 0.pool.ntp.org
(2) Be sure to verify that your inventory path/filename are writable. Do not
lose the inventory file. It is the only means of identifying what is
uploaded into your Glacier vaults.