I recently needed some simple scripts to backup files on various machines, stuff like configs and even some small CouchDB files. Not finding something already out there I put together tens3
, two simple scripts to get and put files to Amazon S3. They provide the following:
- uses s3 to backup a directory of files (no subdirectories)
- uses fadvise to be easy on filesystem caches and disks
- purges files after X days
- streams files rather than loading them entirely into memory
They are very simple to use, just create a configuration file together:
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.
Enjoy and let me know if you find any bugs or want new features.