JOB to optimize/dump BDD and backup files
Permalink
BETA NOW ONLINE. This job for conrete let you optimize/dumpout your database. It also backup all the files on your web site. after it send you a mail to one you prefer to let you know how to download there backup. The archive files are saved in a protected folder with random log and pass you'll be alone to have.
But as sysadmin i wrote it mailny with bash code. Then it's not windows compliant.
i take care to use only very common tools to be ok with mainly linux distrib.
i know i could do it in php but linux as an engine to do it, with less code, then why don't use it :) An also because i have to made my brain working to do some php and with sheel script it's natural :)
and there is no timeout like in php ;) for big dump.
if you would test, here is th beta:
But as sysadmin i wrote it mailny with bash code. Then it's not windows compliant.
i take care to use only very common tools to be ok with mainly linux distrib.
i know i could do it in php but linux as an engine to do it, with less code, then why don't use it :) An also because i have to made my brain working to do some php and with sheel script it's natural :)
and there is no timeout like in php ;) for big dump.
if you would test, here is th beta:
1rst post edited with the beta online.
install instruction in the archive. avalaible in english and french (just have to set it in the file).
later if i have as many translation as concrete5 have it will be better to set on the C5 defined vars directly.
install instruction in the archive. avalaible in english and french (just have to set it in the file).
later if i have as many translation as concrete5 have it will be better to set on the C5 defined vars directly.
Installed fine and it ran successfully, but no backups were create, no new folders were created and no email was sent...
Let me know if you need any information from me.
Let me know if you need any information from me.
hi :) is your safe_mod ON ?
on with distrib did you made your test ?
on with distrib did you made your test ?
I didn't probe further but they run suhoshin and all kinds of other things so I don't have much hope.
hum very strange.
Firts safe_mod must be OFF.
try to chmod755 the file /helpers/bdd_manage.sh
you must have right to chmod, create folder, create, modify and delete file.
tell me what is the reponse of there commands (in a shell):
and
Firts safe_mod must be OFF.
try to chmod755 the file /helpers/bdd_manage.sh
you must have right to chmod, create folder, create, modify and delete file.
tell me what is the reponse of there commands (in a shell):
whereis bash
whereis sendmail
and
uname -r
shell command responses:
/bin/bash
/usr/sbin/sendmail
2.6.18-92.1.17.el5
/bin/bash
/usr/sbin/sendmail
2.6.18-92.1.17.el5
the script is updated, to fix a bad url when concrete is on root.
now the SQL socket is no more defined in the php file, but in the bash.
now the SQL socket is no more defined in the php file, but in the bash.
safe mode is OFF
files are chmod 755
updated scripts
running 5.1.1 version of concrete5
it did send the email this time, but there were no links or password in it
no files or folders were created
files are chmod 755
updated scripts
running 5.1.1 version of concrete5
it did send the email this time, but there were no links or password in it
no files or folders were created
ok seem to be good the common tools are at the right places regarding the script.
could you test a bash command?
if yes log on you shell and go the helpers folder:
or the complete path if you don't log on the web site root.
and launch the script with your arg:
with the correct value of replacement.
in this way you will see what's happend and tell me the errors.
if you want a complete raport uncomment the 'set -x' at the beginning of the bash file
for myself on debian etch & lenny, ubuntu server 8,04 & 8,10 it's works coorectly.
or contact me by mail cali [at] concrete5.fr
in this way we could exchange our msn or other messenger to discuss about ;)
could you test a bash command?
if yes log on you shell and go the helpers folder:
cd helpers
or the complete path if you don't log on the web site root.
and launch the script with your arg:
./bdd_manage.sh BDD_NAME BDD_USER PASSWD localhost YOUR_MAIL 50 En http://YOUR_SITE 3306 YOUR_FOLDER_IF_NOT_DIRECTLY_ON_WEB_ROOT
with the correct value of replacement.
in this way you will see what's happend and tell me the errors.
if you want a complete raport uncomment the 'set -x' at the beginning of the bash file
for myself on debian etch & lenny, ubuntu server 8,04 & 8,10 it's works coorectly.
or contact me by mail cali [at] concrete5.fr
in this way we could exchange our msn or other messenger to discuss about ;)
things I noticed so far:
line 117: htpasswd: command not found
i ran it from shell and it created the files and sent the email, but it couldn't create the password file
also, the links in the email are wrong and ended up being something like:
http://8295:3200831650@/my_bkp/fl/backup_12-19-2008.tar.gz...
line 117: htpasswd: command not found
i ran it from shell and it created the files and sent the email, but it couldn't create the password file
also, the links in the email are wrong and ended up being something like:
http://8295:3200831650@/my_bkp/fl/backup_12-19-2008.tar.gz...
the link syntax should be:
http://login:passwd@domain.com/folder/folder/archive.tar.xx...
then you're one is right it just miss the domain name in it.
perhaps a mystake on your args you send by hand.
really strang that by script the htpasswd command is not take in care.
i have to investigate. witch distrib of linux do you have? fedora, debian, suze, gentoo, another?
and witch version of apache? (apt-cache policy apache if you are on debian - or apache2 instead of apache)
edit ok i understand it's the c5.org web site who parse the url the the command is wrong. Normally in code balise the url don't have to uin care by any str_replace or other tool.
replace the command by the one in the attached file then.
http://login:passwd@domain.com/folder/folder/archive.tar.xx...
then you're one is right it just miss the domain name in it.
perhaps a mystake on your args you send by hand.
really strang that by script the htpasswd command is not take in care.
i have to investigate. witch distrib of linux do you have? fedora, debian, suze, gentoo, another?
and witch version of apache? (apt-cache policy apache if you are on debian - or apache2 instead of apache)
edit ok i understand it's the c5.org web site who parse the url the the command is wrong. Normally in code balise the url don't have to uin care by any str_replace or other tool.
replace the command by the one in the attached file then.
1rst post updated with version 0.0.3
check here:
http://www.concrete5.org/index.php?cID=4464...
http://www.concrete5.org/index.php?cID=4464...
i'll post the bete release tonight (gmt +1) for those who would test.