rsync from GUI interface

1,295 views
Skip to first unread message

Benoit Mabille

unread,
Oct 27, 2013, 2:23:56 PM10/27/13
to
Hello,

ALT-F 0.1 RC3 is such great software that I put to use 2 old DNS-323 to serve as backup for main NAS (Netgear)

I would like to use rsync : got it to work quickly on a test setup, using ALT-F options (services-system-configure backup..)
Then I reconfigured both boxes with new disks etc
Now I cannot get it to work.. it runs (taking up CPU, showing as active in status page) and no error message in log, but : no file copied at all.

When I launch a rsync in command mode, it works ok (I need to confirm the RSA trust, then have to enter the password)

My thoughts are :
- RSA key between the 2 boxes ? ALT-F does not give me the message with instructions
- password ? (looks ok in rsyncd.secrets file)
- reinstall the firmware and reconfigure the whole thing ?

Any idea ? I do not get a useful log other than the process has been launched. I spent some time on this but am not a Linux expert, only a long-time DOS person  ;-)

Tx   :-)

João Cardoso

unread,
Oct 28, 2013, 10:39:27 AM10/28/13
to


On Sunday, October 27, 2013 6:20:24 PM UTC, Benoit Mabille wrote:
Hello,

ALT-F 0.1 RC3 is such great software that I put to use 2 old DNS-323 to serve as backup for main NAS (Netgear)

I would like to use rsync : got it to work quickly on a test setup, using ALT-F options (services-system-configure backup..)
Then I reconfigured both boxes with new disks etc
Now I cannot get it to work.. it runs (taking up CPU, showing as active in status page) and no error message in log, but : no file copied at all.

When I launch a rsync in command mode,

logged in as an ordinary or as the root user?

What's your /etc/backup.conf and /var/log/backup.log?


it works ok (I need to confirm the RSA trust, then have to enter the password)

My thoughts are :
- RSA key between the 2 boxes ? ALT-F does not give me the message with instructions

After selecting 'rsync' as the 'Type',  using 'Joao Cardoso" (jcard) as the "Run As" user, I got this under "/home/Joao Cardoso/Backup-rsync-ssh.txt"

 Backup ID 0: ssh keys have been created for you.
You must now setup a trusted password-less connection from host DNS-325
to host silver. This can't be automated, manual intervention is needed:
1-Logged in as user jcard at host silver you should execute the commands
cd # change to your home directory
scp DNS-325:.ssh/id_rsa.pub . # copy public key generated at  to silver
cat id_rsa.pub >> .ssh/authorized_keys # allow password-less connection from DNS-325
2-Login as user jcard to host DNS-325 and execute the command
ssh silver # this will make DNS-325 a trusted host to host silver
After accepting, you can logout.

And in /var/log/backup.log, got this:

DATE=Mon Oct 28 14:16:32 NONE 2013
backup: Doing backup: id=0 type=rsync runas=jcard host=silver srcpath=win  dstpath=/Backup when=* at=20 log=no nlogs=0
rsync: failed to connect to silver (192.168.1.1): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]
NO rsync module
Will output 1024 bit rsa secret key to '/home/Joao Cardoso/.ssh/identity'
Generating key, this may take a while...
Public key portion is:
ssh-rsa ... root@DNS-325
Fingerprint: md5 1b:9f:5b:...
backup: ID 0: ssh keys have been created for you.
You must now setup a trusted password-less connection from host DNS-325
to host silver. This can't be automated, manual intervention is needed:
...

Also, /etc/backup.conf says:

# cat /etc/backup.conf 
#id;type;runas;host;mac;srcpath;dstpath;when;at;log;nrotate
0;rsync;jcard;silver;bc:...:6d;win;/Backup;*;20;no;0

And when running 'backup 0' at the command line, I got under /var/log/backup.log:

Host 'silver' is not in the trusted hosts file.
(fingerprint md5 c3:7b:d9:18:53:1e:f4:5e:98:68:39:1d:7c:52:e7:0a)
Do you want to continue connecting? (y/n) ssh: Connection to jcard@silver:22 exited: Didn't valida
te host key
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [Receiver=3.0.9]
backup: 0 failed but continuing nevertheless, err=12: 
backup: Backup 0 finished

Please notice that I have not setup rsync at the 'silver' side and I'm running the to-be RC4


- password ? (looks ok in rsyncd.secrets file)
- reinstall the firmware and reconfigure the whole thing ?

No!
 

Any idea ?

Have you read the online help?

rsync this mode of operation uses the rsync program to make the backup. It can work in two modes: using rsync/ssh or a rsync daemon on the remote host.
The backup script first tries to use the daemon mode, and if unsuccessful tries the rsync/ssh mode.
  • For the daemon mode, there must exist a rsync user with the same nick name and password in both computers, and a remote rsync daemon must be setup first. In the remote host a file /etc/rsyncd.secrets must exist with lines of the form user:password and the file/etc/rsyncd.conf must contain the definition of the module to backup.
    The Folder entry must start with the daemon module name to backup.
    If Folder is vuze/plugins and a rsync module named vuze exists in host silver, where user Run As has permissions to use the module and its nick:password is in the /etc/rsyncd.secrets file, then the backup will be located in /Backup/silver_vuze_plugins.
  • In the rsync/ssh mode, password-less login using ssh cryptographic keys has to be manually setup.
    If a .ssh/identity file is not found in the Run As home folder, ssh keys will be created for him and a file with instructions left in his home folder. After following the instructions the backup should proceed normally.
    If host is silverFolder is workspace and Run As is jcard, then the backup will be located in/Backup/silver_jcard_workspace/.

Benoit Mabille

unread,
Oct 28, 2013, 3:48:11 PM10/28/13
to
Hello Joao,

I used rsync manually, logged as root user

backup.conf & backup.log are attached

/home/root is empty

on-line help is good, I understand most, by I probably miss some point as only little Linux experience.

All other comments you make SSH keys etc I had them before I reconfigured the box with new disks.
Now it behaves differently.

I feel like I should start over again

Tx    :-)


backup.log
backup.conf

João Cardoso

unread,
Oct 29, 2013, 11:19:43 AM10/29/13
to al...@googlegroups.com


On Monday, October 28, 2013 7:26:56 PM UTC, Benoit Mabille wrote:
Hello Joao,

I used rsync manually, logged as root user

backup.conf & backup.log are attached

/home/root is empty

The 'root'  user home folder is '/root' , not '/home/root', and it is not persistante, its contents will disappear after a reboot (search for a topic regarding setting up ssh and the root user).

It is thus not a good idea to use the root user for password-less ssh.
You might want to setup up a rsync module (using rsync parlance) in the target computer, search for 'man rsyncd.conf', or run the backup as a normal user (the "RunAs")


on-line help is good, I understand most, by I probably miss some point as only little Linux experience.

All other comments you make SSH keys etc I had them before I reconfigured the box with new disks.
Now it behaves differently.

New disks => empty folders => lost ssh keys

I feel like I should start over again

If you changed disks, the users home folders are gone, although the users might still exists.
 

Tx    :-)


Joao Cardoso

unread,
Oct 31, 2013, 12:03:47 PM10/31/13
to alt-f, benoit mabille
On 10/29/2013 08:43 PM, benoit mabille wrote:

Hello,

 

I notice that I can SSH into the source NAS (a NETGEAR device) only using ‘root’. Any other account will not work.


I can't help with that.

Then use 'root' as the runAs user, but remember that /root/.ssh/ will vanish after a reboot or poweroff.
You might recreate its contents either by

-using the user init-script and adapting the next script to your needs:
#!/bin/sh

# user initscript to be saved in a disk filesystem, sdb2 used as example
# create in /mnt/sdb2/run_at_boot.sh
# then 'chmod +x /mnt/sdb2/run_at_boot.sh'
# then specify '/mnt/sdb2/run_at_boot.sh'
# as the "Script to execute on powerup" under Services->User->user->Configure

mkdir -p /root/.ssh
chmod 700 /root/.ssh
cp /mnt/sdb2/authorized_keys2 /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys

exit 0
-or use /Alt-FR/root, which lies on disk and will be overlaid over /root. Start installing a Alt-F package, any package (ipkg itself is enough), then
   mkdir -p /Alt-F/root/.ssh
from now on, every new file created or edited under /root or /root/.ssh will be resident on disk.
This approach is not recomended, as it might have nasty side effects.


Of course, you might use any other backup methods, such as NFS, smb, ftp...
All them will internaly use rsync to make the backup, but as rsync runs locally with no encryption, they are faster than the explicit rsync method.

benoit mabille

unread,
Nov 1, 2013, 4:07:23 AM11/1/13
to Joao Cardoso, alt-f

Hey J

I didn’t realise NFS backup will use incremental logic rsync, then I configured it and – presto – it works !!!

The 2 DNS-323 are busy filling up their disks !!!!

Now I can take some time to learn a bit about DEBIAN, optimize speed with Jumbo frames etc

Tx a bunch

 

 

João Cardoso

unread,
Nov 1, 2013, 11:08:14 AM11/1/13
to al...@googlegroups.com, Joao Cardoso


On Friday, November 1, 2013 8:07:23 AM UTC, Benoit Mabille wrote:

Hey J

I didn’t realise NFS backup will use incremental logic rsync, then I configured it and – presto – it works !!!


I should state that more clearly on the online help. ALL backup methods use rsync internally, all they start by making the remote folder localy available (either by SMB/NFS mounting, or by wget mirror mode), then use rsync in local directory mode -- much faster, no crypto involved, which by itself restricts net6work transfers to 2MBs.

I noticed that on your backup.conf you activate the 'Log' checkbox. That will perform a 'diff' on all files, and will take *ages* to accomplish, if at all! Please read the tooltip
 

The 2 DNS-323 are busy filling up their disks !!!!


Glad to ear.

Alt-F Backup has not been the subject of any topics, so either it is not being used by anyone or is used and has no bugs, which I just don't believe ;-)
I think that it has some nice features, like the WOL to wake up the remote computers when backup time arrives and no need to install software on the remote computers (just use what they provide)
Reply all
Reply to author
Forward
0 new messages