tens3 : dead simple s3 backups
-
uses s3 to backup a directory of files
-
uses fadvise to be easy on filesystem caches and disks
-
purges files after X days
-
streams files rather than loading them entirely into memory
license:
This code is available as Open Source Software under the MIT license.
ruby dependencies:
fadvise right_aws
configuration:
tens3.yml:
amazon_access_key_id: “someid” amazon_secret_access_key: “somekey” backup_dir: “/some/path/” purge_threshold: 3 bucket_name: “somebucket”
usage:
backup a directory of files:
$ ./tens3_put tens3.conf
restore a file from a backup:
$ ./tens3_get tens3.conf date somefile ./somefile
The date is the date that the file was backed up in a YYYYMMDD format.
caveats:
The script will only backup files at one directory level, it does not recurse into subdirectories.