Hello everybody,
I'm setting up Amanda to work as the global ISP solution for customers
having to backup hosting/housing/spaces/servers.
I've conviced management that this software can be a great solution
avoiding to purchase expensive softwares like Arcserve, Legato, Tivoli ecc.
Now, while implementing it, I had to deal with a limit of Amanda.
Customers have to pay to be backed up and thus I have to control the
size of every backup client (aka disk).
In my case the customer is supposed to pay for a "tape quota"... for
example, 1Gb space for 3 installations.
I need a mechanism to control if the overall storage of customers'
servers are hitting/exceeding the quota they have paid.
The 2 goals to achieve are:
1) to be informed about overflows in relation to every purchased
customer quota and even to notify the customer
2) to effectively deny the backup if the client has exceeded his quota
I propose two different approaches to partially/definitely solve the
problem:
1st solution: more easy, the partial one
----------------------------------------
Add new parameters in the dumptypes declaration section of the
amanda.conf file.
Example:
define dumptype customername {
global
program "GNUTAR"
comment "root partitions dumped with tar"
compress none
index
exclude list "/usr/local/lib/amanda/exclude.gtar"
priority low
# -- BEGINNING OF NEW PARAMETERS
quota 1Gb
quotahits 7
# -- END OF NEW PARAMETERS
}
In this way you can limit Amanda from doing backups larger than 1Gb for
that dumptype that corresponds for example to "customerX".
"quotahits" may be the maximum number of times that Amanda does the
backup before refusing to do it.
Obviously, during the amcheck you have to be notified of this so you can
contact your customer to extend the quota or just making him to reduce
the amount of data to backup.
I think that these new parameters can even be useful to do other things.
This solution does not solve in an elegant way the original problem to
check for ALL customer server(s) because it controls only a dumptype
that is assigned to a particular server (aka disk) and not customer.
2nd solution: the more complex but definitive
---------------------------------------------
Add support to Amanda to handle a cluster of disks to make them part of
a group.
The parameters detailed in the 1st solution could be applied to the
entire group affecting all the disks.
In my case that group could be the customer.
Grouping can be implemented like:
define group groupname {
diskname1
diskname2
...
disknameN
quota 1Gb
quotahits 7
}
inserting this text in the disklist file or in other places.
Additional handy feature
------------------------
To achieve an easy management of this new functionality it may be useful
to add a new parameter in the group definition to alert who as to be.
For example:
define group security_department {
gatekeeper
snortsrv
syslogger
maxquota 5Gb
quotahits 7
# -- BEGINNING OF NEW PARAMETER
email securteam AT company DOT com
# -- END OF NEW PARAMETER
}
With this new parameter additional folks can be alerted of this situation.
You will achieve a minimum of delegation in the entire backup process to
avoid wasting space while backupping unneeded data that grows in the wild.
Alternatively the responsible for that group can contact the backup
administrator asking for more space.
----
I hope to receive comments about this because I do not think I'm the
only one having this type of need.
Bye all
Stefano Coletta
creator AT mindcreations DOT com
http://www.mindcreations.com
|