I've been through this sort of thing quite a few
times now, and tend to embrace the Unix model for cookbooks more
and more. That is, have a cookbooks that do one small thing and
do it well and are only loosely coupled (if at all) to anything
else in Chef.
So for what you are trying, Bryan, I think I'd end up with
something like this (assuming that your 'cluster' is a
database cluster or some other type of datastore):
- A cookbook that that manages the data layer itself (for
example, Postgres)
- This cookbook includes a recipe for making local
backups/dumps of data in some univerally-understood format
(for example, .tgz)
- Local backup directory is an overridable attribute
- A cookbook that manages backups
- Likely creates a cronjob
- Knows about a few types of remote data storage
(NFS/FTP/Joyent Manta/Amazon S3/etc)
- Remote backup location and protocol are overridable
attributes
By separating concerns, I've found that my infrastructure
is much less brittle and individual components can be improved
without breaking anything else (Unix
model/service-orientedness).
(As an aside, I love using Manta for backups because I get
to use all the traditional Unix tools *inside* my object
store, (for things like md5sum/gzcat/log analysis, etc), and
the cli interfaces are super lightweight and easy to employ
inside of cookbooks (npm install manta))
Blake