rsync to remote server

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
Hello,
I need backup local folder to remote qnap server.
When run task rsync says: could not create directory /nonexist/.ssh

so I add auxiliary parameter —password -file but rsync generate this issue: —password-file option may be only when accessing an rsync deamon.

someone can help me?
thanks
 
Joined
Oct 22, 2019
Messages
3,641
When run task rsync says: could not create directory /nonexist/.ssh

Sounds like the user account does not have a home directory configured.

Accounts > Users > locate user account > Edit > Directories and Permissions

After this, you can generate SSH keys. Make sure that the user's home directory (or specifically the .ssh folder) has permissions only for the user itself (i.e, "group" and "other" should have zero access). Or else SSH will complain.
 

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
Sounds like the user account does not have a home directory configured.

Accounts > Users > locate user account > Edit > Directories and Permissions

After this, you can generate SSH keys. Make sure that the user's home directory (or specifically the .ssh folder) has permissions only for the user itself (i.e, "group" and "other" should have zero access). Or else SSH will complain.

this is the permission of rsync user.
if set chmod 600 file password, generate this issue:
rsync: could not open password file /mnt/data-z1/pwd/rsync.pwd: Permission denied (13)

if set chmod 777:
ERROR: password file must not be other-accessible
 

Attachments

  • Senza titolo-1.jpg
    Senza titolo-1.jpg
    38.5 KB · Views: 464

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
ok new issue:
@Error: auth failed on module Multimedia

remote server is a Qnap NAS, so I create rsync server with username and password
 
Joined
Oct 22, 2019
Messages
3,641
this is the permission of rsync user.

The user account on your TrueNAS system has no real home directory. The path /nonexistent is a place-holder for users that do not have home folders. A home folder will look something like this, assuming the username is "freddy": /mnt/mypool/homedirs/freddy

When you generate an SSH key pair, it will automatically create a hidden folder named .ssh and store the files within. This folder should have 700 permissions, meaning only the owner ("freddy") has any read/write/exec access.

EDIT: Are you hoping to use SSH mode or is there an rsync daemon running on the Qnap server? Remember that configuring an Rsync Task to use Module mode means everything will be sent unencrypted! This isn't a problem for a local home network, but you said "remote" so I'm assuming it's outside of your local network?
 
Last edited:

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
The user account on your TrueNAS system has no real home directory. The path /nonexistent is a place-holder for users that do not have home folders. A home folder will look something like this, assuming the username is "freddy": /mnt/mypool/homedirs/freddy

When you generate an SSH key pair, it will automatically create a hidden folder named .ssh and store the files within. This folder should have 700 permissions, meaning only the owner ("freddy") has any read/write/exec access.

EDIT: Are you hoping to use SSH mode or is there an rsync daemon running on the Qnap server? Remember that configuring an Rsync Task to use Module mode means everything will be sent unencrypted! This isn't a problem for a local home network, but you said "remote" so I'm assuming it's outside of your local network?

now it run in Module with rsync daemon server on Qnap nas located in the same office.
in Module mode have the issue “The --password-file option may only be used when accessing an rsync daemon.”

with Rsync task in SSH mode or replication task have same issue of authentication.
 

Attachments

  • Senza titolo-1.jpg
    Senza titolo-1.jpg
    62.6 KB · Views: 519
  • Senza titolo-2.jpg
    Senza titolo-2.jpg
    65.3 KB · Views: 427
Last edited:
Joined
Oct 22, 2019
Messages
3,641
What is "misc" under iocage/misc? Is that a Jail that is currently running? (Usually those are saved under "iocage/jails"). Did you manually create that folder? What are the permissions for rsync.pwd? (Is there a reason you store it under iocage?)

The Qnap server, I am assuming, has a different path for where you wish to sync your directory MEDIA-DRIVE-1/? It would be typed in manually under the "Remote Path" section. For example: /media/share/MEDIA (or whatever format Qnap uses.)

Is the rsync daemon module, on the Qnap server, named exactly Multimedia?

Is there a user named "rsync" on the Qnap server? I don't believe you need to prepand the host address with "rsync@". Just the IP address or hostname will do. (Unless there is a different auth username specified on the Qnap server?)

For context, did you get this setup working before?
 
Last edited:

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
What is "misc" under iocage/misc? Is that a Jail that is currently running? (Usually those are saved under "iocage/jails"). Did you manually create that folder? What are the permissions for rsync.pwd? (Is there a reason you store it under iocage?)

The Qnap server, I am assuming, has a different path for where you wish to sync your directory MEDIA-DRIVE-1/? It would be typed in manually under the "Remote Path" section. For example: /media/share/MEDIA (or whatever format Qnap uses.)

Is the rsync daemon module, on the Qnap server, named exactly Multimedia?

Is there a user named "rsync" on the Qnap server? I don't believe you need to prepand the host address with "rsync@". Just the IP address or hostname will do. (Unless there is a different auth username specified on the Qnap server?)

For context, did you get this setup working before?
I have manually create "misc" and set chmod 600.

with just ip adrress no issue "The --password-file option may only be used when accessing an rsync daemon.”
but says "@Error: auth failed on module Multimedia"

in the qnap module I cant add module name. I have follow this step

never work this job for me, I tray rsync from Qnap to TrueNas serverer and that work but qnap have only push.
 

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
from TrueNas server terminal run this test: rsync -avz --delete user@192.168.1.100:/share/Multimedia/ .
with "rsync" user, permission denied, "admin" user works. So I add admin@192.168.1.100 in rsync task via gui and same issue "@Error: auth failed on module Multimedia"
 

giuseppe30

Dabbler
Joined
Dec 20, 2020
Messages
36
after some test with rsync module via terminal (rsync -avz --delete user@192.168.1.100::Multimedia)
the problem is a bug on qnap rsync server gui. Restart service a lot of times and now that works.

This Qnap nas is temporarily and it will replace soon with another truenas server

thanks
 
Top