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:

1 Attachment

cali
 
cali replied on at Permalink Reply
cali
1rs post updated
i'll post the bete release tonight (gmt +1) for those who would test.
cali replied on at Permalink Reply
cali
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.
LucasAnderson replied on at Permalink Reply
LucasAnderson
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.
cali replied on at Permalink Reply
cali
hi :) is your safe_mod ON ?
on with distrib did you made your test ?
ScottC replied on at Permalink Reply
ScottC
I didn't probe further but they run suhoshin and all kinds of other things so I don't have much hope.
cali replied on at Permalink Reply
cali
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):
whereis bash

whereis sendmail

and
uname -r
LucasAnderson replied on at Permalink Reply
LucasAnderson
shell command responses:

/bin/bash

/usr/sbin/sendmail

2.6.18-92.1.17.el5
cali replied on at Permalink Reply
cali
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.
LucasAnderson replied on at Permalink Reply
LucasAnderson
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
cali replied on at Permalink Reply 1 Attachment
cali
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:

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 ;)
LucasAnderson replied on at Permalink Reply
LucasAnderson
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...
cali replied on at Permalink Reply 1 Attachment
cali
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.
cali replied on at Permalink Reply
cali
1rst post updated with version 0.0.3
cali replied on at Permalink Reply
cali