Backup to remote server isn't going into correct folderb

I backup all our call recordings each night from my PBX to my desktop computer. This was working great until May 23rd. Now, when PBX sends the backup to my desktop computer (via Filezilla server) it’s trying to save it in the wrong directory.

I have my server settings in FreePBX set to save the recordings at /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup

But, my Filezilla Server logs are showing that’s trying to save the recordings in the directory /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup

It’s adding an additional folder with the same name to the end. This folder doesn’t exist and is not being created in the process.

Here is the Filezilla server log

FileZilla Server 0.9.60 beta
Copyright 2001-2016 by Tim Kosse ([email protected])
https://filezilla-project.org/
Connecting to server localhost:14147...
Connected, waiting for authentication
Logged on
You appear to be behind a NAT router. Please configure the passive mode settings and forward a range of ports in your router.
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> Connected on port 64492, sending welcome message...
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> 220-FileZilla Server 0.9.60 beta
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> 220-written by Tim Kosse ([email protected])
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> 220 Please visit https://filezilla-project.org/
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> USER PBX
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> 331 Password required for pbx
(000004)6/16/2022 12:42:35 PM - (not logged in) (192.168.1.xxx)> PASS ********
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 230 Logged on
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> SYST
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 215 UNIX emulated by FileZilla
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> TYPE A
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 200 Type set to A
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> PORT 192,168,1,109,213,212
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 200 Port command successful
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> LIST /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 150 Opening data channel for directory listing of "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup"
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 226 Successfully transferred "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup"
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> TYPE I
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 200 Type set to I
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> PORT 192,168,1,109,218,236
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 200 Port command successful
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> STOR /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup/20220616-123808-1655401088-14.0.16.11-34449381.tgz
(000004)6/16/2022 12:42:35 PM - pbx (192.168.1.xxx)> 150 Opening data channel for file upload to server of "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup/20220616-123808-1655401088-14.0.16.11-34449381.tgz"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 226 Successfully transferred "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup/20220616-123808-1655401088-14.0.16.11-34449381.tgz"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> TYPE A
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 200 Type set to A
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> PORT 192,168,1,109,129,38
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 200 Port command successful
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> LIST /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 150 Opening data channel for directory listing of "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 226 Successfully transferred "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> PORT 192,168,1,109,224,122
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 200 Port command successful
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> LIST /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 150 Opening data channel for directory listing of "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 226 Successfully transferred "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> PORT 192,168,1,109,152,119
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 200 Port command successful
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> LIST /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 150 Opening data channel for directory listing of "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 226 Successfully transferred "/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup"
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> DELE /Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Call_Recording_Backup/20220616-000001-1655355601-14.0.16.11-699080165.tgz
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 250 File deleted successfully
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> QUIT
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> 221 Goodbye
(000004)6/16/2022 12:44:47 PM - pbx (192.168.1.xxx)> disconnected.

Here is the Call_Recording_Backup folder after I ran a manual backup.

Anyone have an idea how to fix this?

Can you please post via pastebin a log from the PBX backup?

I can’t get any logs from the backup. I’ve tried these two commands in my CLI but no logs for the backup come across.

amportal a dbug

tail -f /var/log/asterisk/full

If you use FreePBX 15, you should be using fwconsole instead of amportal

Enable that the backup should send you an email:

Upload the file content to pastebin.freepbx.org and share the URL.

Thanks for the help! You led me to the answer.

I had the path under the servers section in FreePBX set to
“/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup”. But I also had the path set in Filezilla server to
“/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup”. So, the files were going to

“/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup/Users/bphil/Documents/PBX Nightly Backup/Call_Recording_Backup”.

I now have it corrected. Thanks!