I am starting a new thread with a new title as the old one does not fit. The Backup issue people have been seeing does not appear to be related to the logrotate issue or 2008 calendar year.
The backup issue seems to be a problem with the ampbackup.pl being removed from where CRON expects it to be.
/bin/sh: /var/lib/asterisk/bin/ampbackup.pl: No such file or directory
it is not missing unless the system has been tampered with in some form or way. It is located in the bin directory under the module and automatically symlinked into the /var/lib/asterisk/bin directory by retrieve_conf upon pressing a reload bar which is required after downloading the module or any other configuration change. If you have permission problems, or improper amportal.conf configurations then this could affect the symlink not being there.
Are you saying that /var/lib/asterisk/bin/ should be a symbolic Link ?
ln -s /var/www/html/admin/modules/backup/bin/ampbackup.pl /var/lib/asterisk/bin/ampbackup.pl
If so who establishes it and when ? What might break it down ?
Which one ?
[trixbox1.localdomain /]# find . -name ‘retrieve_conf’ -print
./usr/src/freepbx-2.3.1/amp_conf/bin/retrieve_conf
./var/lib/asterisk/bin/retrieve_conf
./var/www/html/admin/modules/framework/bin/retrieve_conf
A simple grep does not indicate the presence of the command…
[trixbox1.localdomain asterisk]# grep ampbackup /var/www/html/admin/modules/framework/bin/retrieve_conf
[trixbox1.localdomain asterisk]#
Also, I went in to force a change / update today and in the GUI again the radio buttons for the Days / Months / Weekdays columns are all checked as “Selected” instead of how I set them which was “All”. for the “Daily” backup as you can see from the first entry in backup.conf.
run retrieve_conf, as user asterisk, from the Linux command line and see if it complains about the symlink. Your grep won’t show anything, it symlinks anything from bin in any module directory to that location.
Did not see you post last night, but yesterday afternoon in an attempt to get a good backup I copied ampbackup.pl
from where it is to where it was looking for it, not a sym link but a hard copy.
Well last night I got this message from the cron job…
Received: from trixbox1.localdomain (trixbox1.localdomain [127.0.0.1])
by trixbox1.localdomain (8.13.8/8.13.8) with ESMTP id m0M6U2f8027722
for <[email protected]>; Tue, 22 Jan 2008 01:30:02 -0500
Received: (from asterisk@localhost)
by trixbox1.localdomain (8.13.8/8.13.8/Submit) id m0M6U260027721;
Tue, 22 Jan 2008 01:30:02 -0500
Date: Tue, 22 Jan 2008 01:30:02 -0500
Message-Id: <[email protected]>
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <asterisk@trixbox1> /var/lib/asterisk/bin/ampbackup.pl 1
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/lib/asterisk>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=asterisk>
X-Cron-Env: <USER=asterisk>
No Backup Schedules defined in Backup
Yet /etc/asterisk/backup.conf shows two scheduled jobs, as does the GU for the Back & Restore Module. No changes (red bar) Pending.
backup.conf is actually nothing more than a left over scratch file that is used when it is creating the cron jobs. The value it provides is to know what FreePBX tried to set for backups. If you do crontab -lu asterisk you will see what is actually set. If something else interferes with the crontab settings, or some bug makes them not take, then the backups won’t fire.
after installing the backup module and pressing the Apply Configuration button, that script should automatically be linked to that directory. Try making a change to your system and apply configurations again to get it linked, and if not then uninstall and reinstall the backup module. If this is from an old trixbox system you may find they used to corrupt this module on their installation requiring you to completely delete the module and then installing it from the online repo.
I finally figured why the ampbackup.pl link was being deleted. It was a Trixbox issue. It turns out that if you open the maint web page (http://{ip address}/maint), of your Trixbox, a script runs that deletes all the symbolic links in /var/lib/asterisk/bin.
To prevent this from happening edit file:
/var/www/html/maint/includes/application_top.php
and around line 32 change this line:
unlink($backupCode_location.$value);