Current time: 04-20-2024, 02:02 AM Hello There, Guest! (LoginRegister)


Post Reply 
ispCP Backup fails...
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #11
RE: ispCP Backup fails...
I was wrong
the rm in cron is for /etc/ispcp/... - the one in the backup routine not.

The first two messages are to ignore: everything seems right: the variables are used only once (they are set elsewhere).

The rm command has to be improved - if there is nothing to delete then rm can be omitted...

/J
10-29-2007 10:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #12
RE: ispCP Backup fails...
I don't have very much time right now, but:
* the find ... | xargs rm one in the cronjob deletes old config files (generated by the engine when a config file is changed)
* the one in the ispcp-backup-ispcp (lol, what a name) is used to remove ispCP's backups older than 14 days, so the admin can restore the config files 14 days older (+7 which are the ones kept under /etc/ispcp/*/backup/); giving enough time to detect an error and restore a backup.

About the error, what about replacing:
Code:
sys_command("find $backup_dir/* -maxdepth 0 -type f -mtime +14 -print | xargs /bin/rm");
with
Code:
`find $backup_dir/* -maxdepth 0 -type f -mtime +14 -print | xargs /bin/rm`
?
11-01-2007 07:32 AM
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: #13
RE: ispCP Backup fails...
Same output with your change:
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.
Here in Debug modus:
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.
DEBUG: push_el() sub_name: backup_ispcp_start_up(), msg: Starting...
DEBUG: push_el() sub_name: lock_backup_ispcp_system(), msg: Starting...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/bin/touch /tmp/ispcp-backup-ispcp.lock'), msg: Ending...
DEBUG: push_el() sub_name: lock_backup_ispcp_system(), msg: Ending...
DEBUG: push_el() sub_name: get_conf(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Ending...
DEBUG: push_el() sub_name: setup_main_vars(), msg: Starting...
DEBUG: push_el() sub_name: decrypt_db_password(), msg: Starting...
DEBUG: push_el() sub_name: decrypt_db_password(), msg: Ending...
DEBUG: push_el() sub_name: setup_main_vars(), msg: Ending...
DEBUG: push_el() sub_name: get_conf(), msg: Ending...
DEBUG: push_el() sub_name: backup_ispcp_start_up(), msg: Ending...
DEBUG: push_el() sub_name: backup_ispcp_engine(), msg: Starting...
DEBUG: push_el() sub_name: get_human_date(), msg: Starting...
DEBUG: push_el() sub_name: get_human_date(), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/usr/bin/mysqldump --add-drop-table --allow-keywords --quote-names -u'root' -p'XXXXXXX' 'ispcp' >'/var/www/ispcp/backups/ispcp.sql''), msg: Ending...
DEBUG: push_el() sub_name: setfmode(), msg: Starting...
DEBUG: push_el() sub_name: setfmode(), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/bin/bzip2 --force '/var/www/ispcp/backups/ispcp.sql''), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/bin/tar --create --directory=/etc/ispcp --bzip2 --file=/var/www/ispcp/backups/config-backup-2007.10.31-213800.tar.bz2 . 2> /var/log/ispcp/config-backup-2007.10.31-213800.tar.bz2.log'), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/bin/rm -rf /var/log/ispcp/config-backup-2007.10.31-213800.tar.bz2.log'), msg: Ending...
/bin/rm: missing operand
Try `/bin/rm --help' for more information.
DEBUG: push_el() sub_name: setfmode(), msg: Starting...
DEBUG: push_el() sub_name: setfmode(), msg: Ending...
DEBUG: push_el() sub_name: backup_ispcp_engine(), msg: Ending...
DEBUG: push_el() sub_name: backup_ispcp_shut_down(), msg: Starting...
DEBUG: push_el() sub_name: unlock_backup_ispcp_system(), msg: Starting...
DEBUG: push_el() sub_name: del_file(), msg: Starting...
DEBUG: push_el() sub_name: del_file(), msg: Ending...
DEBUG: push_el() sub_name: unlock_backup_ispcp_system(), msg: Ending...
DEBUG: push_el() sub_name: backup_ispcp_shut_down(), msg: Ending...

Greez BeNe
11-01-2007 07:42 AM
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: 1 Guest(s)