Current time: 11-27-2024, 04:39 AM Hello There, Guest! (LoginRegister)


Post Reply 
ispCP Backup fails...
Author Message
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #1
Question ispCP Backup fails...
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
10-29-2007 07:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: ispCP Backup fails...
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
10-29-2007 08:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #3
RE: ispCP Backup fails...
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
10-29-2007 08:14 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: ispCP Backup fails...
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
10-29-2007 08:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: ispCP Backup fails...
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
10-29-2007 08:35 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #6
RE: ispCP Backup fails...
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
10-29-2007 08:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #7
RE: ispCP Backup fails...
I did
http://www.isp-control.net/ispcp/ticket/827
10-29-2007 08:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #8
RE: ispCP Backup fails...
Fine - i was not wrong...
My bug sniffer is mostly right Big Grin

Thanks for the Ticket - wait for you fix Wink

Greez BeNe
10-29-2007 08:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #9
RE: ispCP Backup fails...
http://www.isp-control.net/ispcp/changeset/892

my first commit :-)
/J
10-29-2007 10:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #10
RE: ispCP Backup fails...
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
10-29-2007 10:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)