Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic backup is this possible
#11
run this on console:
/etc/init.d/apparmor stop

then retry operation
if apparmor is loaded, then you cannot write to some files even if you are root...
i hope this helps..if not, let me in by ssh

Restored from old drupal forum, for user uid:1238 username:Arens
You may reset your password to access your new account here.
Reply
#12
ps aux | grep php
root 3498 0.0 2.1 192340 22224 ? S 06:12 0:03 php index.php daemon
root 9174 0.0 0.0 3876 588 pts/1 S+ 21:50 0:00 grep php

the ehcp.log just shows the daemon loop numbers nothing else

this is the output from the backup:
Backup starting..: dirname:/var/backup/mybackup20100511210552, filename:mybackup20100511210552
executing command: mkdir -p /var/backup/mybackup20100511210552
(escapedcmd: mkdir -p /var/backup/mybackup20100511210552)


pwd is:/var/backup/mybackup20100511210552
total 0




pwd is:/var/backup/mybackup20100511210552
total 0



executing command: tar -zcvf mybackup20100511210552.tgz mybackup20100511210552
(escapedcmd: tar -zcvf mybackup20100511210552.tgz mybackup20100511210552)
mybackup20100511210552/


pwd is:/var/backup
total 3015708
-rw-r--r-- 1 root root 1542514850 May 11 18:53 backup2010-05-11_06-41-25.tgz
-rw-r--r-- 1 root root 1542520285 May 11 09:55 backup2010-05-11_09-44-34.tgz
-rw-r--r-- 1 root root 122 May 11 18:35 mybackup20100511180535.tgz
-rw-r--r-- 1 root root 125 May 11 18:36 mybackup20100511180536.tgz
-rw-r--r-- 1 root root 125 May 11 18:39 mybackup20100511180539.tgz
-rw-r--r-- 1 root root 124 May 11 21:48 mybackup20100511210548.tgz
drwxr-xr-x 2 root root 4096 May 11 21:52 mybackup20100511210552
-rw-r--r-- 1 root root 122 May 11 21:52 mybackup20100511210552.tgz



executing command: rm -rvf mybackup20100511210552
(escapedcmd: rm -rvf mybackup20100511210552)
removed directory: `mybackup20100511210552'
finished backups..waiting for 5 sec to let you check.hope finished... Smile


Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#13
if i use the backup-script as it is in ver.0.29.13
it is creating the backupfile but with 0 content(empty.

something i understand wrong?

do i have to change this ?:
$whattobackup="files,mysql"; # you may also include ehcp's files here..



Restored from old drupal forum, for user uid:133 username:Cool
You may reset your password to access your new account here.
Reply
#14
make sur your ehcp daemon is running normally, check using
ps aux | grep php

can you please send ehcp.log changes while you do backup ?
tail -f /var/log/ehcp.log



Restored from old drupal forum, for user uid:133 username:Cool
You may reset your password to access your new account here.
Reply
#15
found the typo. here is the script how i use it.

#!/usr/bin/env php
<?php

include_once("/var/www/vhosts/ehcp/config/dbutil.php");.
include_once("/var/www/vhosts/ehcp/config/adodb/adodb.inc.php"); # adodb database abstraction layer.. hope database abstracted...
include_once("/var/www/vhosts/ehcp/classapp.php"); # real application class



$app = new Application();
$app->requirePassword=false;
$app->initialize();

$backupname='mybackup'.date('Y-m-d-H-m-i');
$whattobackup="-files,-mysql"; # you may also include ehcp's files here..

$app->daemonBackup('',$backupname,$whattobackup);

echo "hope finished... Smile";
?>

most important is:
$whattobackup="-files,-mysql"; //the "-" was not set in your script!!!

and....happy again!

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#16
maybe "bzip" instaed of "tar" would be safe some recources?

Restored from old drupal forum, for user uid:133 username:Cool
You may reset your password to access your new account here.
Reply
#17
you are absolutely right. thankyou for this bug report.
i will fix it here also, in ehcp sources that is downloaded by everyone.
you learned php/ehcp coding now Smile

how did you find it, i mean php coding style of ehcp ? almost anything in classapp.php, a single class ?


Restored from old drupal forum, for user uid:133 username:Cool
You may reset your password to access your new account here.
Reply
#18
yes...just searched for the definition. i use ehcp for i think close to 3 years now and i´ve read all the code so i know it was in classapp.

i can read and understand coding but never have learned coding by my self and now as a 53 years old farth it´s hard to find the time to do it.
but you do it in a smart way!!!

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#19
For the new versions of ehcp where the ehcp config files are under /var/www/new

you have to edit the backup script accordingly:

include_once("/var/www/new/ehcp/config/dbutil.php");
include_once("/var/www/new/ehcp/config/adodb/adodb.inc.php");
include_once("/var/www/new/ehcp/classapp.php");




Restored from old drupal forum, for user uid:133 username:Cool
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping