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


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

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


RE: ispCP Backup fails... - raphael - 11-01-2007 07:32 AM

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`
?


RE: ispCP Backup fails... - BeNe - 11-01-2007 07:42 AM

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