Config section inheritance
Gavin Carr
gavin at openfusion.com.au
Fri Jan 15 17:10:08 UTC 2010
I'm thinking about implementing simple config section inheritance in
brackup, such that any keys that aren't defined in one section could
be inherited from a 'parent' section.
That would let you do things like this in your brackup.conf (note the
'inherit' parameters):
[TARGET:myserver_defaults]
type = Sftp
sftp_host = myserver.openfusion.com.au
sftp_user = brackup
keep_backups = 0
[TARGET:myserver_home]
inherit = TARGET:myserver_defaults
path = /data/brackup/home
[TARGET:myserver_images]
inherit = TARGET:myserver_defaults
path = /data/brackup/images
keep_backups = 20
[TARGET:myserver_music]
inherit = TARGET:myserver_defaults
path = /data/brackup/music
[SOURCE:defaults]
noatime = 1
chunk_size = 64MB
merge_files_under = 1kB
smart_mp3_chunking = 1
[SOURCE:music]
inherit = SOURCE:defaults
path = /data/music
[SOURCE:home]
inherit = SOURCE:defaults
path = /home
ignore = /\.Skype/
ignore = /\.Trash/
...
[SOURCE:home-monthly]
inherit = SOURCE:home
avoiding lots of redundancy, multiple places to update, etc.
Thoughts? Any better ideas?
Cheers,
Gavin
More information about the brackup
mailing list