Hello
I'm a new user of this forum. English is not my natural language so excuse me by advance if my sentences are not always really understandable :-p
Well here is my problem.
I use a panel and I need to use the backup command of this panel to backup all my customer account (created under this panel)
I may use an option like "backup --domains=*all" but in this case the backup command run during more than 3 hours and use huge ressources (cpu, etc..)
So my idea is to create a shell script to backup some domains every hours. For example every domains that begin by "A*" would be backuped at 01:00AM, every "B*" at 02:00AM, etc....
I have the list of all domains listed in /etc/httpd/conf.d
My idea is to do soemthing like this
Quote:
PATH2CONF=/etc/httpd/conf.d
CAse current hour = 01 then DOM = a*
Case current hour = 02 then DOM = b*
etc ...
RSLT=`ls -1 domain.com.conf_to_ignore /$PATH2CONF/$DOM`
for TOBACKUP in $RSLT; do
Remove the .conf at the end of domain.com.conf
BACKUP --domains=$tobackup
done
My two main problems are :
1/ I don't know how to write in SHELL command the line
Quote:
CAse current hour = 01 then DOM = a*
2/ I don't know how to remove the .conf at the end of the $TOBACKUP (domain.com.conf)
Of course it is not a very beautifull script. It could be best to calculate the number of existing domains then divise it by 24 hours and backup the result every hours, but for me it become to strong :-p so I prefere to begin by soemthing simple
There is maybe others solutions to not backup all my customer account in one shot but few per hours or days.
I'd really apreciate your help about my 2 mains pbms and all advises/comments you may give me to realise this.
Thanks a ton
Pascal