Duplicacy Init Setup SFTP Syntax Error

So I’ve just downloaded Duplicacy to our Synology RackStation to be used for our offsite backup. We’re currently using VerticalBackup to backup the ESX to a share on our Synology Rackstation.

From the rack station we’re then going to push this to an SFTP server.

I’ve tried to init the path but can’t seem to do so. I’m using…

./duplicacy init remote_backup sftp://username@ftp.server.com:21212/

The SFTP server does require a password (currently not sure where exactly to add this)
./duplicacy: line 1: syntax error: unexpected word (expected ")")

Anyway… I’m being presented with the following error;
Looks to me like a bug in the application? I’m running the latest version of Dup.

Any ideas…?

./duplicacy doesn’t look like a valid binary. Make sure that you download the right binary (that is supposed to work on your NAS) and that the executable permission is set.

Hi @Gchen,

I’ve run just ./duplicacy which has given me an output. I downloaded the arm version for Linux but renamed for ease of executing.

I’ve also tested by just going to a local path instead of using SFTP which worked fine.

It’s just the SFTP command is giving me the error as mentioned above.

1 Like

It’s just a way of calling duplicacy when it’s in the current directory

line 1: syntax error: unexpected word is an error reported by the shell. Somehow ./duplicacy is interpreted by the shell as a shell script instead of an arm executable. I would suggest using the absolute path like /path/to/the/duplicacy/binary instead of ./duplicacy.

2 Likes

Thanks @gchen, that looks to have worked although, a very strange issue.

When using SFTP how would I go about entering the password for the SFTP server/connection?

This will help: Passwords, credentials and environment variables

Thanks @saspus I’ve added the SSH password to my preferences file but no joy… it still asks me for the SSH password when I try and backup via SFTP.

{
    "name": "default",
    "id": "hv1",
    "storage": "sftp://backup_user@ftp.server.com:49485/.",
    "encrypted": false,
    "no_backup": false,
    "no_restore": false,
    "no_save_password": false,
    "keys": null
	"DUPLICACY_SSH_PASSWORD": "password123"
}

Quoting that page:

Saving credentials to Duplicacy config file

Use one of the above environment variables, but lowercase and remove duplicacy_

so DUPLICACY_SSH_PASSWORD becomes ssh_password and should go to the keys dictionary:

therefore instead of

"keys" : null
"DUPLICACY_SSH_PASSWORD": "password123"

you shall have

"keys": {
     "ssh_password": "password123"
}

It is also useful to test your json file after editing for syntax errors (e.g, you were missing comma after null, so this could not have possibly worked even if keys were correct) using one of the million json validators.

And finally, to avoid manually editing the preferences file you can tell duplicacy to do it for you:

duplicacy set -key ssh_password -value password123

It’s also on that page.

4 Likes

omg are there actual humans who use bing? i thought that was just a myth!

1 Like

Haha :).

But seriously, I use bing since very long ago and now that it had learned my search habits it handles my fuzzy search queries better than google, which did not have a chance to build up my profile because I only use it occasionally (when bing fails miserably) to find some obscure stuff such as MLB schematic of a weird Chinese single board pc from Ali express. yes, I admit google seems to have way more stuff indexed. Otherwise I’m super happy with bing. And Bing desktop is awesome. They should port it to MacOS :slight_smile:

1 Like

Thanks @saspus. That worked.

2 other things;

  1. Can I setup Duplicacy to email me when a backup completes/fails, if so how? I couldn’t see anything on the Wiki?
  2. How do I add the backup task to a cron job on the ARM Version of Duplicacy? I’m running this on a Synology Rack Station if thats of any help?

Linux syn-01 3.2.40 armv7l GNU/Linux synology_armadaxp_rs815

In order to keep the discussion in each topic focussed, could you please create a new topic for each of your two questions?