Hestia remote backup Error code: 1, SFTP error and solution

Hi guys,

When I try, as admin user, to add a remote backup server from the Hestia Web UI and click save I get the error ‘Code 1’

Steps:

Server > Configure > Backups

Click on Remote backup

Then I Fill:

Protocol: SFTP
Hostname: backup.ftpserver.tld
Username: root
Password: mypassword
Directory: /backup

Then I click on save button and then get the error Code 1

I am using Debian 9.11 Stretch and Hestia 1.0.6 Release branch and PHP 7.3.13

IMAGE:

Solution: https://forum.vestacp.com/viewtopic.php?t=17923

Is it a bug on Hestia Release 1.0.6 ?

Yes, this has been fixed: https://github.com/hestiacp/hestiacp/issues/493

I still have the error. it works once with a newer Hestiacp installation with ubuntu 20.04. With the older installation with Ubuntu 18.04. the error 1 appears.

Please supply log files

/var/log/hestia/error.log

its was in /usr/local/hestia/log

2020-09-22 05:42:47 v-backup-user ‘admin’ [Error 15]
2020-09-22 05:44:59 v-backup-user ‘user’ [Error 15]
2020-09-22 20:16:48 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ ‘’ ‘backups’ ‘22’ [Error 1]
2020-09-22 20:17:16 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ '
’ ‘backups’ ‘22’ [Error 16]
2020-09-22 20:18:31 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ ‘’ ‘backups’ ‘22’ [Error 1]
2020-09-22 20:19:31 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ '
’ ‘backups’ ‘22’ [Error 1]
2020-09-22 20:20:39 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ ‘’ ‘backups’ ‘22’ [Error 1]
2020-09-22 20:21:32 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ '
’ ‘/backups’ ‘22’ [Error 1]
2020-09-22 20:23:19 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ ‘’ ‘/uploads/backups’ ‘22’ [Error 1]
2020-09-22 20:23:52 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ '
’ ‘’ ‘22’ [Error 1]
2020-09-22 20:24:46 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ ‘’ ‘/backups’ ‘22’ [Error 16]
2020-09-22 20:25:35 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ '
’ ‘backups’ ‘22’ [Error 1]
2020-09-22 20:34:18 v-add-backup-host ‘sftp’ ‘IP hidden’ ‘user’ ‘******’ ‘’ ‘22’ [Error 1]

Check if you can login / with the data. I have no issues at 1.2.4 / 1.2.3 / any version before…

the sftp login works. what i also noticed is that the password changes after the error message in the field.

the pw is 4z#q}s2uw7$u and after that 4z#q}s2uw7$u is displayed. but i don’t think that is the reason.

edit: lol the password change is not shown here in the forum. but you can see it when you go to post edit. slashes are added.

Check in /usr/local/hestia/conf/sftp.backup.conf

How its saved you can also change it if necessary

HOST=‘host’
USERNAME=‘username’
PASSWORD=‘password’
BPATH=’’
PORT=‘22’
TIME=‘16:20:09’
DATE=‘2020-08-28’

the file was not created but now it worked after all. apparently he only takes the changed password with slashes. thanks.

in general slashes and quotes are no good choice for any password :wink:

1 Like

where do i have slashes in pw? hestiacp added a slash before each special character. i think it is a bug.

oh, my apologies, I misunderstood that then! I agree, if slashes get added that’s not as it should be…

This isn’t right…
escapeshellcmd should be escapeshellarg

Need to investigate it more… Please submit a bug report.

Even I enter the password via command line

It still fails

Hello,

i would like to point out that when the password did not work no backup was made, not even locally. so if the remote server fails, a backup should be made at least locally.

Optional, I suggest - could easily fill a local filesystem, in some cases.

I can do nothing with the answer. I think it is a mistake. You can adjust how many backups are stored. But yes it would be better if you could set 1 backup locally and 2 or more backups remotely.

You can check the “Local backup” option.

what should I check? i see 3 possible settings. Local backup was set to yes but because of wrong pw on the remote server no backup was created.

If “Local backup” was set to yes the original shouldn’t be deleted. Can you create a bug report?