Open Source Training Seminar FreePBX Paid Support

Ticket #2520 (new Bugs)

Opened 9 months ago

Last modified 1 month ago

ampbackup doesn't handle backup scripts whose names contain spaces

Reported by: benlast Assigned to:
Priority: major Milestone: 3.0
Component: Backup & Restore Version: 2.4.0
Keywords: Cc:
Confirmation: Need Feedback SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

The ftp backup feature of ampbackup fails (silently) if the backup script name contains a space (for example "Nightly Backup"). I believe this is because the lcd command (that is one of the ftp commands written to /tmp/freepbx-backup.ftp) cannot cope with the space. I tested adding quotation marks around it (changing line 233 of ampbackup.pl to 'printf FILE "lcd \"$backupdir/$Backup_Name/\"\n";' but this did not appear to work. An alternative solution would be to derive the name of the backup directory from the script name, but omit spaces (or replace with underscores). Or just point out to the user that the name should not contain a space...

Attachments

page.backup.php.diff (0.6 kB) - added by jfinstrom on 01/24/08 20:29:18.

Change History

01/22/08 19:42:38 changed by jfinstrom

could add

$file = preg_replace ( '/ {1,}/', '_', trim ( $file ) ); After line 25 (r3676)

01/24/08 20:29:18 changed by jfinstrom

  • attachment page.backup.php.diff added.

02/07/08 08:44:30 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • milestone changed from Cut Line to 3.0.

it's not clear to me if the above fix has been tested and confirmed good.

06/23/08 20:59:05 changed by p_lindheimer

  • version changed from 2.3.1 to 2.4.0.

The ftp ability is a hidden feature that is only 'kind of' supported. If someone wants to add or confirm that the above fixes this reported issue, I'll be glad to get it in. (Hint Hint Jim) - and please re-supply it as a proper patch for easy testing.

If I don't hear back, I'll close this as wontfix, thanks.

07/01/08 14:44:29 changed by lazytt

ping: anyone test this?

07/22/08 23:11:15 changed by p_lindheimer

  • milestone changed from 2.5 to 3.0.

must not be very important, bumping.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads