ispCP - Board - Support
ispCP Backup fails... - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: ispCP Backup fails... (/thread-1651.html)

Pages: 1 2


ispCP Backup fails... - BeNe - 10-29-2007 07:39 PM

Hello together,

i have every night a new "ispcp-backup-ispcp.lock" in my /tmp Folder.
becaus of this cron entry:
Code:
@daily root /var/www/ispcp/engine/backup/ispcp-backup-ispcp noreport &>/var/log/ispcp/ispcp-backup-all-mngr.log
Here is the logfile
Code:
Name "main::db_user" used only once: possible typo at /var/www/ispcp/engine/backup/ispcp-backup-ispcp line 232.
Name "main::db_pwd" used only once: possible typo at /var/www/ispcp/engine/backup/ispcp-backup-ispcp line 233.
/bin/rm: missing operand
Try `/bin/rm --help' for more information.
ERROR: File '/var/www/ispcp/backups/config-backup-2007.10.29-092304.tar.bz2' does not exist !

Can anyone confirm this ?
Or is it a problem on my Server ?

Greez BeNe


RE: ispCP Backup fails... - joximu - 10-29-2007 08:01 PM

Hi BeNe

I have the three engine/backup files from oct 17 - since oct 14 there were no changes.
It's ok on my server (backups are made).

But my cron looks different (but maybe older...)
Code:
# Backup
0       1       *       *       *  root /var/www/ispcp/engine/backup/ispcp-backup-all yes &>/var/log/ispcp/ispcp-backup-all-mngr.log

# Remove config backups older than seven days
@daily root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs /bin/rm
/J


RE: ispCP Backup fails... - BeNe - 10-29-2007 08:14 PM

But it looks like a script Error:
Code:
/bin/rm: missing operand
Try `/bin/rm --help' for more information.
I found this in /var/www/ispcp/engine/backup/ispcp-backup-all:
Code:
sys_command("find $backup_dir/* -maxdepth 0 -type f -mtime +14 -print | xargs /bin/rm");
The only part which use "/bin/rm"

I have also a part like your in the cron:
Code:
@daily root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs /bin/rm

At this moment r891 is running...

Greez BeNe


RE: ispCP Backup fails... - joximu - 10-29-2007 08:32 PM

This is double-deleting...

Either the cron entry should be removed (is this an old one from earlier releases?)
or the sys_command should be improved... if nothing is found: rm complains about no arguments... (the cron maybe complains too...)


But the real error seems this one:

ERROR: File '/var/www/ispcp/backups/config-backup-2007.10.29-092304.tar.bz2' does not exist !

I have nothing in /var/ispcp/backups - maybe gOOvEr knows more - he has a more recent ispcp running than me.

I'll try the backup-ispcp - this is new :-)

/J


RE: ispCP Backup fails... - joximu - 10-29-2007 08:35 PM

Ah

if I run it manually:
Code:
debix:/var/www/ispcp/engine/backup# ./ispcp-backup-ispcp noreport
Name "main::db_user" used only once: possible typo at ./ispcp-backup-ispcp line 232.
Name "main::db_pwd" used only once: possible typo at ./ispcp-backup-ispcp line 233.
/bin/rm: fehlender Operand
„/bin/rm --help“ gibt weitere Informationen.
ERROR: File '/var/www/ispcp/backups/config-backup-2007.10.29-113306.tar.bz2' does not exist !

Then I'll have to delete the .lock-file manually.

Looks and sounds like a bug...
/J


RE: ispCP Backup fails... - joximu - 10-29-2007 08:47 PM

More...

in /var/log/ispcp/config-backup-2007.10.29-113239.tar.bz2.log (or whatever)
Quote:/bin/tar: Anlegen eines leeren Archivs wird feige verweigert.
„/bin/tar --help“ oder „/bin/tar --usage“ gibt weitere Informationen.

the backup command is:
Code:
/bin/tar --create --directory=/etc/ispcp --bzip2 --file=/var/www/ispcp/backups/config-backup-2007.10.29-114127.tar.bz2 2> /var/log/ispcp/config-backup-2007.10.29-114127.tar.bz2.log

There is a point missing - tar does not know what exactly to backup (in folder /etc/ispcp)

->
Code:
/bin/tar --create --directory=/etc/ispcp --bzip2 --file=/var/www/ispcp/backups/config-backup-2007.10.29-114127.tar.bz2 .

the last point is important :-) gimme some points :-))))

let's throw the dice who may open the ticket...

Cheers
J


RE: ispCP Backup fails... - joximu - 10-29-2007 08:51 PM

I did
http://www.isp-control.net/ispcp/ticket/827


RE: ispCP Backup fails... - BeNe - 10-29-2007 08:57 PM

Fine - i was not wrong...
My bug sniffer is mostly right Big Grin

Thanks for the Ticket - wait for you fix Wink

Greez BeNe


RE: ispCP Backup fails... - joximu - 10-29-2007 10:02 PM

http://www.isp-control.net/ispcp/changeset/892

my first commit :-)
/J


RE: ispCP Backup fails... - BeNe - 10-29-2007 10:20 PM

Yeah, i saw it! [Image: d055.gif]
All in all it works - there is now a Backup.

But i have still these entry´s in the logfile:
Code:
Name "main::db_user" used only once: possible typo at /var/www/ispcp/engine/backup/ispcp-backup-ispcp line 232.
Name "main::db_pwd" used only once: possible typo at /var/www/ispcp/engine/backup/ispcp-backup-ispcp line 233.
/bin/rm: missing operand
Try `/bin/rm --help' for more information.

And what about the double delete ??
Cron AND this script ?

Greez BeNe