How to take backup with ssh key

I have finished setup duplicati on my own server to test it as a backup solution to our servers. i can access the web interface and i can see that i need user name and password to take backups.
right now we connect to our servers with ssh but we don’t use user name and password we use ssh key.
i don’t know how to take buckup from one of our server now is there any guide or video that can help me or maybe someone here can explane it to me.

You can use the ssh-keyfile advanced option to provide the path to your private key. Duplicati will then use this to authenticate with your server, which should have your public keys.

See [SOLVED] SFTP/SSH backups without password (pubkey only)? for related details.

here what i did

Storage Type : sftp(SSH)

Server and port: my ip and port

Path on server : /root/

Username : root

password : anypassword

ssh-keyfile : /root/.ssh/id_rsa

when i test conniction i get this error

Failed to connect: Could not find a part of the path “/.ssh/id_rsa”.

I’m a little confused. You installed Duplicati on the server that you want to back up files from, but where do you want to back up to?

sry if made you confused i should explain this better than what i did to help you help me faster.

i installed duplicati on server 1
i have file on server 2 i want to backup
server 3 is where i will backup my files
all 3 server is linux
i am just testing right now my plane is to backup on s3 AWS after testing done but just for now to test and know every thing about duplicati i am using this 3 server that I told you about
thanks for you time on replying i really appreciate your help. i like the web interface of duplicati and i really want to use it as fast as i can.

Ah, okay :slight_smile:

Duplicati can only back up local files on the system it is installed, so you will need Duplicati on server 2.

From server 2 you can back up to server 3 using an SSH key, but you will need to either have the SSH key located on server 2 when using --ssh-key-file or alternatively you can use the --ssh-key option to paste your own SSH key into the web UI (for example if you do not have an SSH key allowing SSH from server 2 to server 3).

I hope that helps :slight_smile:

ohhh ok so if we have more than 1 server i have to install duplicati on all of them and i will have a diffrant web interface for every server did i understand you right ??

Yep, each web UI manages the backup software on the machine it’s installed on :slight_smile:

You could mount server 2 on server 1 via SSHFS to avoid needing to run Duplicati on server 2. I do this to back up a remote client site. I use a run-script-before-required to mount their filesystem to a local mount point, then umount afterward. SSHFS supports keys, with something like:

sshfs me@x.x.x.x:/remote/path /local/path/ -o IdentityFile=/path/to/key

(from Stack Overflow)

Yup, any functionality mounting a remote file system into your local file system will work :slight_smile:

I usually refrain from mentioning it because the performance will be subpar, but is it an option if installing Duplicati on a system isn’t possible.

I understand. I think it’s a really useful option that Duplicati can be used in a centralized manner if desired. All my jobs are listed in one place and I can sign into the web interface and see right away what’s happening.

I think you’re trying to solve a different issue. There isn’t a solution yet, but this thread discusses the problem you’re trying to address :slight_smile:

@janani wrote:

ohhh ok so if we have more than 1 server i have to install duplicati on all of them and i will have a diffrant web interface for every server did i understand you right ??

I was just providing another option because the quoted statement isn’t an absolute requirement. It is possible to run Duplicati on one server and back up other servers, with just one web interface for all backup jobs.