Remote FTP backup doesn't work

I configured remote FTP backup, the backup is created correctly on hestiacp but I can’t see any file in my ftp storage.

Tell us how to replicate the bug

New complete ftp backup
job is done correctly
no file on ftp storage
However Ideepl
can download backup from backend even if i disabled local backup

Hestia Control Panel Version

1.7.7

Operating system

Debian 11.7 (x86_64)

Set 1:
Check the logs

What do you see if you run v-backup-user admin

root@adminpanel:~# v-backup-user admin
-- SYSTEM --
2023-05-29 23:03:14 admin.conf
2023-05-29 23:03:14 stats.log
2023-05-29 23:03:14 history.log
2023-05-29 23:03:14 pam


-- WEB --
2023-05-29 23:03:14 hostname.domain.it
2023-05-29 23:03:14 *** 1 domain ***

-- DNS --
2023-05-29 23:03:14 *** 0 domains ***

-- MAIL --
2023-05-29 23:03:14 *** 0 domains ***

-- DB --
2023-05-29 23:03:14 *** 0 databases ***

-- CRON --
2023-05-29 23:03:14 *** 11 jobs ***

-- User Dir --
2023-05-29 23:03:14 adding .bash_aliases
2023-05-29 23:03:14 adding .bash_logout
2023-05-29 23:03:14 adding .bashrc
2023-05-29 23:03:14 adding .cache
2023-05-29 23:03:14 adding .composer
2023-05-29 23:03:14 adding .config
2023-05-29 23:03:14 adding .local
2023-05-29 23:03:14 adding .npm
2023-05-29 23:03:14 adding .profile
2023-05-29 23:03:14 adding .ssh
2023-05-29 23:03:14 adding .vscode-server
2023-05-29 23:03:14 *** 11 directories ***

-- SUMMARY --
2023-05-29 23:03:14 Remote: ftp://nas.domain.comBACKUP_VPS/admin.                                   2023-05-29_23-03-14.tar
ftp: connect: Connection timed out

It seems you are missing a forward slash in that url.

1 Like

Fixed it on setting page, but it doesn’t work again.

root@adminpanel:~# v-backup-user admin
-- SYSTEM --
2023-05-30 11:33:38 admin.conf
2023-05-30 11:33:38 stats.log
2023-05-30 11:33:38 history.log
2023-05-30 11:33:38 pam


-- WEB --
2023-05-30 11:33:38 adminpanel.domain.it
2023-05-30 11:33:38 *** 1 domain ***

-- DNS --
2023-05-30 11:33:38 *** 0 domains ***

-- MAIL --
2023-05-30 11:33:38 *** 0 domains ***

-- DB --
2023-05-30 11:33:38 *** 0 databases ***

-- CRON --
2023-05-30 11:33:38 *** 11 jobs ***

-- User Dir --
2023-05-30 11:33:38 adding .bash_aliases
2023-05-30 11:33:38 adding .bash_logout
2023-05-30 11:33:38 adding .bashrc
2023-05-30 11:33:39 adding .cache
2023-05-30 11:33:39 adding .composer
2023-05-30 11:33:39 adding .config
2023-05-30 11:33:39 adding .local
2023-05-30 11:33:39 adding .npm
2023-05-30 11:33:39 adding .profile
2023-05-30 11:33:39 adding .ssh
2023-05-30 11:33:39 adding .vscode-server
2023-05-30 11:33:39 *** 11 directories ***

-- SUMMARY --
2023-05-30 11:33:39 Remote: ftp://host.domain.com/BACKUP_VPS/admin                                                                                                        .2023-05-30_11-33-39.tar
ftp: connect: Connection timed out

My FTP connections works fine…

you’ve a connection timeout, somehow your host can’t be reached. Try to use ftp client manualy and verify, where the issue is.

Using filezilla it works fine… I’m connecting to port 21 with FTP protocol (no ssl), user backup-vps and root folder /BACKUP_VPS

Why using this command v-backup-user admin the summary is 2023-05-30 11:33:39 Remote: ftp://host.domain.com/BACKUP_VPS/admin ? What is the /admin at the end?

How do you have it up in the settings:

on settings page I’ve this:

CHECKED Remote backup
Protocol
FTP
Host
host.domain.com
Port
21
Username
backup-vps
Password
entered
Directory
/BACKUP_VPS

echo -e “$(date “+%F %T”) Remote: ftp://$HOST$BPATH/$user.$backup_new_date.tar

As $user is the admin I wonder is not set…

Create a test file test.txt

Try to run via cli:

	/usr/bin/ftp -np host.domain.com 21 << EOF
    quote USER backup-vps
    quote PASS xxxxx 
    binary
    "ls /"
    quit

Yes it’s set, I can login with admin user on panel.

/usr/bin/ftp -np myhost.mydomain.com 21            Connected to myhost.mydomain.com.
220 NASFTPD Turbo station 1.3.6 Server (ProFTPD) [::ffff:192.168.1.200]
ftp> quote USER backup-vps
331 Password required for backup-vps
ftp> quote PASS XXXXXXX
230-Benvenuto nel NAS di Stefano!
230 User backup-vps logged in
ftp> binary
200 Type set to I
ftp> "ls /"
?Invalid command
ftp> ls /
227 Entering Passive Mode (192,168,1,200,216,247).
ftp: connect: Connection timed out

But using filezilla it works…

Status:	Resolving address of myhost.com
Status:	Connecting to XXX.XX.XX.XX:21...
Status:	Connection established, waiting for welcome message...
Status:	Plain FTP is insecure. Please switch to FTP over TLS.
Status:	Logged in
Status:	Retrieving directory listing...
Status:	Server sent passive reply with unroutable address. Using server address instead.
Status:	Directory listing of "/" successful
Status:	Retrieving directory listing of "/BACKUP_VPS"...
Status:	Server sent passive reply with unroutable address. Using server address instead.
Status:	Directory listing of "/BACKUP_VPS" successful

I resolved.
I set an external IP address to my FTP passive configuration server.

Now it works, thank for your help and patience.

Last question, which command can I use to run a complete daily backup on cronjob?
Do will you add the feature to the gui in the future?

v-backup-users but it should be present allready

Yes it’s present on admin user with this cron

Every 5 hours, but it doesn’t work automatically

It is not every 5 hours but at 5:10 local server time.

OK, now here it’s 10:20am, so last night it didn’t work.
I checked server time zone and it’s ok.

 date
Wed 31 May 2023 10:22:12 AM CEST

Run v-backup-users

And check what happens if should add a new backup to this list

Yes, it adds a new backup to this list and save file to my ftp storage correctly.

I confirm that cron job doesn’t work…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.