The following notes are from an email exchange detailing questions and answers about successful installation of BackupNetClone. These notes apply to BackupNetClone version 1.0.0 and Fonz' fun_plug (ffp) version 0.3. This installation is for backing up one disk to the other disk within the DNS-323. QUESTION: How are files restored, and which shell client is best? ---------------------------------------------------------------------- My setup is as follows: PC > wire > DIR-655 (router) > wire > DNS-323 MacBook is connected wireless to the router Yes, back up from one disk to the other on the DNS is what I want. The idea with the DNS is to store all the data I have in one place so that I can access it from any computer at home or even from the outside if needed. Volume 1 is mapped on both PC and Mac. Since Volume 1 is the only place where I store all my data it is essential that it is properly backed up. I'm using the routine described at http://forum.dsmg600.info/t1150-Tutorial%3A-Backup-Everything-from-once-night.html now. It works fine but it doesn't help if I accidentally remove or damage a file and discover it after more than one day. That's why your solution is so interesting. I wonder also how the backup is restored if an accident happens. I couldn't find the answer at your page at sourceforge. May be it will be obvious when I have installed the software. :-) Another (smaller :-)) question is why it is recommended using Putty in all the guides? DOS prompt works fine for me. Just type "telnet" in it and then "o server_IP" and you are in. Well, I check only temperature in it but I guess it should work for everything else. The installation of the backup routine as described in the forum I did through Terminal from my Mac which is native Unix. ---------------------------------------------------------------------- ANSWER: Copy files from mapped drive; PuTTY is nice on Windows. ---------------------------------------------------------------------- Your setup is the same as what I use at my home--using the first drive as the main data drive for several home computers, then having the second drive in the DNS-323 keep snapshots of the data drive. The question about restoring data is a good one--I'll have to add that to the FAQ. Basically you just map the second disk in the DNS-323 and browse around until you find the data you need, which will be organized by date in 'snapshot' directories. If you need to restore the whole data disk (and not just a few files), then you'd probably want to use the 'cp' command to recursively copy from the desired snapshot directory to the new, empty, data drive. As for using PuTTY, it's just nicer than the Windows built-in telnet client. It's not necessary. In my case I use it because I've turned off telnet access altogether and use SSH to get to my DNS-323. That way I can access the DNS-323 from anywhere on the Internet securely--after installing BNC you'll have SSH already enabled and can then open a port on your DIR-655 to do command-line stuff or file transfers (SCP is the file transfer system that it built into SSH) securely over SSH. ---------------------------------------------------------------------- Introductory QUESTIONS and ANSWERS ---------------------------------------------------------------------- > [[Get command-line access to DNS-323]] > - install inreto fun_plug 0.3 > - unzip funplug-0.3.tar.gz to two files > > > - put two files in HD_a2 root > - restart > > I have already command line access to DNS-323 (funplug 0.3). I guess I don't > need this step. Should I install 0.4? I've heard that it doesn't have rsync. > So, it would mean extra work for me to install it too in this case. What is > "inreto"? Correct, you have already done this step. Version 0.4 isn't necessary, but also shouldn't cause any problems assuming you get the rsync add-on for it. "inreto" is part of the name of the website where fonz has his fun_plug (referred to as ffp on the forums) available. > > [[Fix clock drift problem on DNS-323]] > > [[NOTE: D-Link firmware 1.04 released Jan 30, 2008 mostly fixed this issue]] > - putty > > > - vi /mnt/HD_a2/fun_plug.d/start/timezone.sh > - http://forum.dsmg600.info/t572-Pulls-Wrong-Time.html > - http://www-1.ibm.com/support/docview.wss?rs=0&uid=isg3T1000252 > > > > - http://wiki.openwrt.org/OpenWrtDocs/Configuration > - timezone="CST6CDT,M3.2.0/2:00:00,M11.1.0/2:00:00" > - timeserv=us.pool.ntp.org > > > > - change sntp to /usr/sbin/sntp > - sleep 1 in timezone_stop() > - chmod a+x /mnt/HD_a2/fun_plug.d/start/timezone.sh > - sh /mnt/HD_a2/fun_plug.d/start/timezone.sh start > - mkdir -p /mnt/HD_a2/fun_plug.d/bin/BackupNetClone > > > > - http://wiki.dns323.info/howto:reduce_clock_drift > - vi /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/log_time.sh > #!/bin/sh > # FILE: log_time.sh > > > > > LOG=/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/log_time.log > NTPSERVER=us.pool.ntp.org > > # look for zombie sntp processes > PID=$(/bin/pidof sntp) > > > > > # kill zombie sntp process > if [ -n "$PID" ] ; then > /bin/kill -9 $PID > fi > > # log NTP time > /usr/sbin/sntp $NTPSERVER >> $LOG > - chmod 655 /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/log_time.sh > > > > - /bin/crontab -e > - 0 * * * * /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/log_time.sh > - wait many hours > - average change per hour is +13.723 seconds = 330 seconds per day > - calculate [offset] = 10000 - (total change in seconds for 24 hours / > 8.64) > > > > - offset = 10000 - 38 = 9962 -> 9960 > - adjtimex -t [offset] > - vi /mnt/HD_a2/fun_plug.d/start/timezone.sh > - at beg of timezone_start() > - TZ="${timezone}" > - export TZ > > > > - at end of timezone_start() > - adjtimex -t [offset] > - #crontab -l | sed -e '/rtc\ -c/d' -e '/daylight/d' -e 's/rtc\ -s/rtc\ > -w/g' -e '$a03 1,6,11,16,21 * * * /usr/sbin/sntp -r us.pool.ntp.org &' | > crontab - > > > > - crontab -l | sed -e '/rtc\ -c/d' -e '/daylight/d' -e 's/rtc\ -s/rtc\ > -w/g' -e '$a03 1,7,13,19 * * * /usr/sbin/sntp -r us.pool.ntp.org &' | > crontab - > > > > - /bin/crontab -e > - remove log_time.sh line > > - restart > > I've got firmware 1.04 on my DNS-323. I guess I don't need this step. Correct, no need to do this step if you have firmware 1.04. > [[On the server only, meaning if the DNS-323 needs to run rsyncd as a > "backup client":]] > > > > > [create SvcwRsync user (required to SSH into DNS-323 as that username)] > - putty > - echo "root::0:0:99999:7:::" >>/etc/shadow > - passwd > - /mnt/HD_a2/fun_plug.d/bin/store-passwd.sh > > > > - vi /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh > - add fun_plug.d/ If you've never used vi, let me know. Or you can google 'vi' for more information. It's a text editor that doesn't use a mouse, so it's a bit daunting at first. Basically, as soon as it's opened the file, hit the letter i on your keyboard to enter edit mode. Then you can use the arrow keys to move around and add/remove/edit text as you like. When you're done, press the Esc key to get out of edit mode, then type the following three characters (colon, w, q) to save the file and exit vi: :wq > - /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh root > - adduser SvcwRsync > (pw is blank) > - /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh SvcwRsync > > > > - /mnt/HD_a2/fun_plug.d/bin/store-passwd.sh > - vi /mnt/HD_a2/fun_plug.d/start/telnetd.sh > - exchange comments on LOPT > > - restart > > The first tough part is coming. :-) As I understand, SSH is a kind of secure > protocol and I need create a password to access it. My current backup works > without any password but I guess SSH is a good thing to have anyway, so I > should do this step. SSH is secure, but you don't necessarily need passwords to use it--BNC uses the passwordless method where you use a specially-generated public/private key pair to authenticate. That way if you have the private key on your computer, then you don't need to type in a password. The instructions basically lay out how to create this key pair, and then how to get the private key available to BackupNetClone. > Should I just type all the commands one after one as quoted above but omit > the dashes? Like this: Yes. The only thing to keep in mind is that some paths and/or filenames might be different for your situation. > putty > > I assume I don't need to type the command in my telnet client and can > directly proceed to the commands below Correct. That's just my note to say where the commands would be entered, i.e., which program you could use to do the commands. > echo "root::0:0:99999:7:::" >>/etc/shadow > > Should I have the same numbers? Yes. You need that line to be exactly as it is shown in the installation notes. > passwd > /mnt/HD_a2/fun_plug.d/bin/store-passwd.sh > > My funplug is put directly under the root. Should I create /mnt/HD_a2 > and move it there? No. Just change the path in my instructions to match your setup, so the command for you will probably be: /fun_plug.d/bin/store-passwd.sh > vi /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh > add fun_plug.d/ > /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh root > adduser SvcwRsync > (pw is blank) > > Will it ask me for password and should I leave it blank? It will ask you to generate a password, but you want to make sure it is empty--just press the Enter key when prompted for the password. > /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh SvcwRsync > > /mnt/HD_a2/fun_plug.d/bin/store-passwd.sh > vi /mnt/HD_a2/fun_plug.d/start/telnetd.sh > exchange comments on LOPT > > restart > ********** > [create SSH public/private key pair on a Windows PC since dropbear (the SSH > server on the DNS-323) isn't very good at that] > - puttygen > > Is this a command in telnet or specific to Putty, which will open > another subroutine for key generation? Puttygen is a program that comes with the PuTTY installation. > - Generate, SSH-2 RSA, 2048, move mouse > - Save public key, ben_dns323_public_key.openssh > - Save private key, yes, ben_dns323_key.ppk > - Conversions, Export OpenSSH Key, yes, ben_dns323_private_key.openssh > > > - copy ben_dns323_private_key.openssh keys to /mnt/HD_a2 > > Must it be done on Putty? Can it be done in DOS or Mac's Terminal, i.e. any > telnet client? Yep, you can use any terminal client. My instructions were tailored for Windows users, and PuTTY is a nice telnet/SSH client for Windows... > [convert the SSH public/private key pair into something dropbear can use] > > - putty > - mv /mnt/HD_a2/ben_dns323_private_key.openssh > /mnt/HD_a2/fun_plug.d/etc/dropbear > > - dropbearconvert openssh dropbear > /mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openssh > /mnt/HD_a2/fun_plug.d/etc/dropbear/dropbear_rsa_host_key > - chmod 600 > /mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openssh > > - mkdir -p /mnt/HD_a2/fun_plug.d/home/root/.ssh > - chmod 0600 /mnt/HD_a2/fun_plug.d/home/root/.ssh > - dropbearkey -y -f > /mnt/HD_a2/fun_plug.d/etc/dropbear/dropbear_rsa_host_key >> > /mnt/HD_a2/fun_plug.d/home/root/.ssh/authorized_keys > > - vi /mnt/HD_a2/fun_plug.d/home/root/.ssh/authorized_keys > - remove lines that don't start with "ssh-rsa" > - chmod 0400 /mnt/HD_a2/fun_plug.d/home/root/.ssh/authorized_keys > - mkdir -p /mnt/HD_a2/fun_plug.d/home/SvcwRsync/.ssh > > - chmod 0600 /mnt/HD_a2/fun_plug.d/home/SvcwRsync/.ssh > - cp /mnt/HD_a2/fun_plug.d/home/root/.ssh/* > /mnt/HD_a2/fun_plug.d/home/SvcwRsync/.ssh > - chown -R SvcwRsync /mnt/HD_a2/fun_plug.d/home/SvcwRsync/.ssh > > - chmod a+x /mnt/HD_a2/fun_plug.d/start/dropbear.sh > - sh /mnt/HD_a2/fun_plug.d/start/dropbear.sh start > > I assume that it's just to type all the code lines above one after one. Are > all the paths the same on my DNS? It sounds like the paths are different for your installation, so you can modify the instructions as appropriate. Let me know if you need help finding which paths are valid yor you. > [create SCP profile to connect to SSH server on DNS-323; useful for file > transfers] > - winscp > > Is this a command in telnet which will open another subroutine for > SCP-profile (whatever it is)? WinSCP is another program available for Windows. It is an SCP client. SCP is a secure method of transferring files through an SSH-style connection (using the public/private key pair). Think of it as another kind of FTP, but this is much more secure. This step is completely optional and you can come back to it later if you decide you want to use SCP. > - Session: hostname, 22, root, ben_dns323_key.ppk > - Shell: off--Lookup user groups > - Directories: /mnt/HD_a2 > - Authentication: all off > > - restart > > I assume that above can be done from any telnet client. You can restart the DNS-323 many ways: 1. Use the power button on the front--hold it down to power down the DNS-323, then push it again to power it up again. 2. Issue the 'reboot' command from any telnet/SSH prompt that's connected to the DNS-323. 3. Use the DNS-323 configuration webpages--login, Tools, System, Restart. > [configure rsync server to run on DNS-323] > - putty > > - cp /mnt/HD_a2/fun_plug.d/etc/rsyncd.conf-sample > /mnt/HD_a2/fun_plug.d/etc/rsyncd.conf > - vi /mnt/HD_a2/fun_plug.d/etc/rsyncd.conf > - [path_to_backup], /mnt/HD_a2, read only = yes, auth users = SvcwRsync > > - echo "SvcwRsync:" >>/mnt/HD_a2/fun_plug.d/etc/rsyncd.secrets > - chmod a+x /mnt/HD_a2/fun_plug.d/start/rsyncd.sh > - sh /mnt/HD_a2/fun_plug.d/start/rsyncd.sh start > > - restart > > [[end of details on server only]] > > > > [[now configure BackupNetClone]] > - putty > > - mkdir -p /mnt/HD_a2/fun_plug.d/bin/BackupNetClone > - cp /mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openssh > /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.192.168.200.101.openssh > > Is this my DNS address? It can be anything you want. In my instructions, it's the IP address of the computer (backup client) to which that private key belongs. So you can use a name or any descriptive text to help you keep track of which private keys belong to which backup clients. > - chmod 0600 > /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh > - chown root.root > /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh > - dropbearconvert openssh dropbear > /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh > /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear > > - rm > /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh > - (using DNS-323 shared drive or FTP, put BackupNetClone.1.0.0.tgz into > fun_plug.d/bin/BackupNetClone) > - tar xzf /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/BackupNetClone.1.0.0.tgz > -C /mnt/HD_a2/fun_plug.d/bin/BackupNetClone > > - vi /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/start_here.sh > edit the appropriate sections to match your setup > > What sections are appropriate? ;-) None. The instructions are outdated on this step. Instead, copy (or rename) the backup-config.example.sh and modify that. For example: - mv /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/backup-config.example.sh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/backup-config.192.168.200.101.sh - vi /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/backup-config.192.168.200.101.sh When you see the contents of the backup-config.*.sh file, you'll see what needs to be edited for your setup. > NOTE: As of version 1.0.0 these settings are now in system_config.sh > and backup-config.xxx.sh > - SSH once to each target to add host to hosts file (answer 'Y' to question > about trusted hosts file) > > How do I do that? As the line below? When you run the command below, you'll be asked the hosts file question. Just press the Y key at that time. > ssh -i > "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear" > "SvcwRsync@localhost" -p 22 -T "ls -al" ---------------------------------------------------------------------- QUESTION: Password and editing telnetd.sh ---------------------------------------------------------------------- Since we skipped the first two instructions I went directly to creating a SvcwRsync user. I typed the lines as said in your text files. When I typed "passwd" it asked me for a new password to the root. Is this the same password that I use when logging in to my DNS-323 through the network? Anyway I typed a password twice (it didn't accept blank password) and went on to vi-editor where I stuck. As I understand I should edit change-homedir.sh in vi-editor. I entered the edit mode but I'm not sure where and how I should "add funplug.d/" What line has to be changed? Also when I type your commands I use exactly the same paths as you and it seems working. In spite of the fact that I can't see any mnt directory on my DNS (see the attached screen shot). Is it a kind of Unix-style directories that cannot be seen? Anyhow I came to editing of change-homedir.sh and don't know how (and where) to add funplug.d/. Please help me out and I will continue. Btw, will I have to do all the steps (echo, passwd etc.) again when I resume? When I look at the rest of the routine I see - exchange comments on LOPT I assume I will have to edit telnetsh.d but what does "exchange comment on LOPT" mean? Again, what lines should I change to what when I enter telnetd.sh in the vi-editor? ---------------------------------------------------------------------- ANSWER: Admin password and instructions ---------------------------------------------------------------------- - The password you chose for root is a good choice. It's just whatever you want as a password when using telnet into the DNS-323, and becoming the administrator in Linux on the DNS-323. - The change-homedir.sh file has some lines at the begining that look like this: passwd_file=/etc/passwd home_dir=/mnt/HD_a2/home For the example setup that I have, I didn't want the /home/ directory being visible with everything else in the Windows mount, so I decided to make it a subdirectory of fun_plug.d/. In other words, you just have to change the above two lines in change-homedir.sh to the following: passwd_file=/etc/passwd home_dir=/mnt/HD_a2/fun_plug.d/home - In Linux, the path to your hard drives are /mnt/HD_a2/ and /mnt/HD_b2/. These two paths are shared with Windows (using samba) as Volume_1 and Volume_2, so you would never see the 'mnt/' in the Windows directory listing of the network-mapped drive. - If you've made it up to the 'vi change-homedir.sh' instruction, then you can just continue from there. There's no need to do the 'echo' and 'passwd' commands again after you've done them once. - When you edit telnetd.sh, it has the following lines near the beginning: # use "login" to make telnet ask for a password LOPT="-l ${BINDIR}/sh" #LOPT="-l ${BINDIR}/login" Change them to: # use "login" to make telnet ask for a password #LOPT="-l ${BINDIR}/sh" LOPT="-l ${BINDIR}/login" You are essentially commenting-out the 'sh' line and uncommenting the 'login' line, thus you are exchanging the comment character on the lines that start with 'LOPT'. This causes the DNS-323 to start asking you for the root password when you telnet in. ---------------------------------------------------------------------- QUESTION: Creating SvcwRsync user and key pair ---------------------------------------------------------------------- Thank your for the guiding. It helped me finish the creating of SvcwRsync user routine. However when I left the password blank after "adduser SvcwRsync"-command it said that the password was too short and suggested to type a password again. I typed a different one (the same I use for "admin"-user name) but the answer was that the passwords didn't match. I realized then that after I entered the blank password for the first time it asked me to repeat it and not to try with a new one. I tried to repeat "adduser SvcwRsync"-command to start all over again but it said that the user already existed. All above probably means that I've created a new user (SvcwRsync) but have no idea what password has been set to it. I believe that no password was set because the passwords mismatched. Can it be an issue later? After I restarted the DNS and tried to telnet it it started asking for login (it didn't before). I am able to log in as "admin" with corresponding password. Is it possible to check somehow that all I've done in this routine is correct? How can I change a password if I need it? I have succeeded to generate SSH keys without problems. I named them "bob_" instead of "ben_" though. I hope it won't cause a problem. :-) I do meet a problem though when I move on to [convert the SSH public/private key pair...] and type mv /mnt/HD_a2/bob_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/etc/dropbear I get a message "mv: cannot rename '/mnt/HD_a2/bob_dns323_private_key.openssh' Permission denied". Can it have something to do with my screwed up passwords after "adduser SvcwRsync"-command? I am logged in as "admin". Should I use a different login? Can it be done in Windows via Explorer instead? Another question concerns [create SCP profile...] routine. After having googled wincp I found out that this is a FTP client. Is it any better than others (like Core FTP, Cute FTP etc)? ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- - to make sure the SvcwRsync user has no password, run the following command: passwd SvcwRsync - then run the 'change-homedir.sh SvcwRsync' and 'store-passwd.sh' commands again - instead of logging into telnet with the Admin user, use the 'root' user with the same password (which is what you supplied after running the passwd command in the original instructions); the Admin user does not have appropriate priveleges to do the commands in the BackupNetClone instructions - you can check if you did the [create SvcwRsync user (required to SSH into DNS-323 as that username)] commands successfully by: - restart the DNS-323 (turn it off and back on) to make sure the results you're getting are permanently stored on the DNS-323 - telnet in as the 'root' user with the password you expect, and type 'pwd'--you should get back /mnt/HD_a2/fun_plug.d/home/root - telnet in as the user 'SvcwRsync' and hit enter when it asks for the Password, then type 'pwd'-- you should get back /mnt/HD_a2/fun_plug.d/home/SvcwRsync - if you ever need to change the password for a user, use the passwd command followed by the username; then use the store-passwd.sh to make the change permanent - you did right in naming your key the way you did - logging in as 'root' instead of 'Admin' will fix your problem with the 'mv ...' command; Windows Explorer won't be able to help you move the file - WinSCP is the only Windows client that I know of that supports SCP. SCP is not the same as FTP, though it looks similar. Normal FTP clients probably won't support SCP, but if you find one, then you're free to use that instead. The reason to use SCP instead of FTP is that SCP is completely secure and uses the public/private keys that you generated for BackupNetClone. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I've succeeded to login as "root" and entered the first line without protests from the program: mv /mnt/HD_a2/bob_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/etc/dropbear However, when I enter the second line: dropbearconvert openssh dropbear /mnt/HD_a2/fun_plug.d/etc/dropbear/bob_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/etc/dropbear/dropbear_rsa_host_key it says: Error: unable to open the key file Error reading key from '/mnt/HD_a2/fun_plug.d/etc/dropbear/bob_dns323_private_key.openssh' As I understand the first command should have created a dropbear directory under funplug.d/etc/ and move my private key there. However, I don't see any dropbear directory there. I see en unix executable file with the same name though (see attached screen shot). There is no bob_dns323_private_key.openssh left directly under the root of Volume_1 either. That would mean that the file was moved but I don't know where - I cannot find it. ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- Ah, the 'mv' command did not create the dropbear directory as you guessed. Instead, the command was assuming it already existed on your DNS-323. So perform the following commands, then rerun the mv command (and the commands after that in the instructions): rm /mnt/HD_a2/fun_plug.d/etc/dropbear mkdir /mnt/HD_a2/fun_plug.d/etc/dropbear ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I've made progress to [create SCP profile to connect to SSH server...]. I got a warning message when I logged on (see attached screen shot) and answered "yes". However, I don't really know what the following lines mean: - Shell: off--Lookup user groups - Directories: /mnt/HD_a2 - Authentication: all off I filled the fields in the login window (hostname, 22, root, bob_dns323_key.ppk) and came to an Explorer-like window with the DNS drive to the right and My Documents to the left (typical ftp-client layout). I looked around a little but couldn't find anything about Shell, Directories or Authentication. A little help is needed here.:-) I didn't proceed to the next routine [configure rsync server to run on DNS-323] because I'm not sure how the lines above affect the rest of the setup. ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- You did right in answering "yes" to the warning--that will only show up the first time you use a program with a new public/private key pair. It sounds like you correctly connected via SCP which is the main point of the step. The other settings are just things I thought I'd recommend. Here's where I found them: - Shell: off--Lookup user groups When you are creating the stored session, go to the Shell item on the left settings list. Then in the 'Other options' area on the right, make sure the "Lookup user groups" setting is off or unchecked. - Directories: /mnt/HD_a2 To have WinSCP automatically open up into the Volume_1 share of the DNS-323 when you SCP into it, you can change the setting. Find the Directories sub-item under the Shell item of the settings. In the "Remote directory" setting, write /mnt/HD_a2 - Authentication: all off This setting helps verify that you have the public/private key pair setup correctly. In the Authentication sub-item of the SSH item in the settings, make sure all of the "Authentication options" are off (unchecked). Here's a couple more additions to the conversation. For getting your SSH to work, it might be easiest to get SSH working by following my suggestions at http://backupnetclone.sourceforge.net/installation02a.html to get SSH/rsync working on the desktop, then do the step related to WinSCP in the http://backupnetclone.sourceforge.net/BNC-on-DNS323-cwrsync-install.temp-distribution.txt instructions. If you can get WinSCP working, then at least you know the key pair authentication is working correctly. Then when WinSCP is working, you can forward a port so that you can try it from 3M. At that point I can help you while in Hutchinson. For PuTTY, here's the settings I used: - Connection - Data Auto-login username: SvcwRsync - Rlogin Local username: (blank) - SSH - Auth Private key file: ...\ben_dns323_key.ppk ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I had to turn the advanced options on to be able to see some of the items. I thought at first that the items were inside the program itself and not in the login dialog. However, one item (SCP/Shell) remains greyed out. So, I don't know how to uncheck "Look up user groups". I hope it is not that important and it will work anyway. That's why I proceeded to the next routine [configure rsync server to run on DNS-323] and it went rather well. Even if you write that the path can be changed I think that in my case I can leave everything as it is. Except the auth user and "read only" for a2 of course. I got the following result: uid = root gid = root auth users = SvcwRsync secrets file = /mnt/HD_a2/fun_plug.d/etc/rsyncd.secrets strict modes = false [vol1] path = /mnt/HD_a2 read only = yes [vol2] path = /mnt/HD_b2 read only = no Before I configure the BackupNetClone and make all things work (hopefully:-)) I want to ask you whether I should delete everything from Volume_2 first. Since I already have rsync backup on my DNS-323 Volume_2 is already a mirror of Volume_1. That can mean that when BNC starts copying the files the space won't be enough if the program must copy all the files again. Some questions about the BNC setup. May be some of them are obvious when I actually start working with it but I thought that it would be useful to be prepared :-). - vi /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/start_here.sh edit the appropriate sections to match your setup I should check that the paths in the file are the same I've chosen, right? Since I used the same paths as you it shouldn't be a problem. NOTE: As of version 1.0.0 these settings are now in system_config.sh and backup-config.xxx.sh Any action from me required? - SSH once to each target to add host to hosts file (answer 'Y' to question about trusted hosts file) ssh -i "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear" "SvcwRsync@localhost" -p 22 -T "ls -al" "... to each target". The first target was "remote_private_key.localhost.dropbear" as I understand. What was the other target? After this is done, you can use 'cp' to quickly copy the bulk of your data into whatever directory is listed in /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/logs/last-rsync-info.xxx.txt Can it be done via ftp or Explore?;-) Is cp command faster way to transfer files than via BNC itself? Should I restart BNC after sh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/interrupt_transfer.sh command? Or will it be restarted at the time I set up later automatically? ...then interrupts itself (if it's still running) at 6:05am (and every 5 minutes after that for 3 more times) Why does it need to repeat the interruption three times? :-O ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- I'm glad you were able to configure PuTTY in the end. I'm sure the "Look up user groups" option is not very important, as you guessed, especially since it seems to work fine for you now. One thing about your rsyncd.conf file: You don't need to share vol2 at all, since BackupNetClone will have direct access to that location. So it is really ok to have only "read only = yes" items in that file. Otherwise it looks fine! Hm, your question about removing everything from Volume_2 is a complicated one. The easiest but slowest way would be to remove everything from Volume_2 before you run BackupNetClone. The annoying thing about this route is that BNC will take a very long time (several days) to do the initial backup, because BNC uses SSH to encrypt the data as it gets copied from HD_a2 to HD_b2, and encryption on the DNS-323 is very slow. The other alternative is to let BackupNetClone start the first session, and then interrupt it with interrupt_transfer.sh. Then you'll want to move all the backup files you currently have and put them in the ".incomplete" folder that BNC creates. Here's the series of commands to do this, assuming you use the default paths from the A->B tutorial (http://forum.dsmg600.info/t1150-Tutorial%3A-Backup-Everything-from-once-night.html) and the default DESTR path in system_config.sh: - get to the point in http://backupnetclone.sourceforge.net/BNC-on-DNS323-cwrsync-install.temp-distribution.txt where it says "try BackupNetClone once:" - run the command listed (sh ..../start_here.sh) - wait 1 hour to make sure BNC has started the actual transfer of files between the disks - open another PuTTY session (leaving alone the one that's running start_here.sh) - run the following command: sh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/interrupt_transfer.sh - after a few minutes, you should see the other PuTTY window finish the start_here.sh and give you the command line prompt - run the following command to find out where BNC put the start of the backup: cat /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/logs/last-rsync-info.* - move the backup files you already have into the BNC location by running the following command, but substitute the correct ".incomplete" [directory name] from the last-rsync-info above: mv /mnt/HD_b2/* "/mnt/HD_b2/Auto-Backup Snapshots/[directory name].incomplete" - now you should have your backup files in the ".incomplete" directory, which is where BNC will try to sync to the next time it runs - if anything didn't get moved correctly, you can manually move or delete these items using the normal Volume_2 Windows share For configuring BNC, you won't have to modify start_here.sh--it no longer has any user-configurable items in it. system_config.sh has defaults that will work for you except for the email section (#### EMAIL CONFIGURATION). This section might cause you the most trouble during configuring depending on your email provider. You only have one target (localhost), so you'll only need to run that "SSH once to each target" once. For anyone who uses BNC to backup multiple computers, they would want to run that command for each one, using the appropriate substitute for "localhost" in the command. For the "you can use 'cp' to quickly copy" information, this is what I mentioned above for you, where I tell you how to use the 'mv' command. The reason to have interrupt_transfer.sh run 3+ times is that it is only effective during an actual file transfer (rsync). If BNC happens to be in-between transfers (if you have multiple backup clients being backed up), then it won't be interrupted. Chances are, though, after waiting 5 minutes, you'll likely hit it while it is in a transfer. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I have not succeeded to make my first BNC backup yet. I get the following message in the log file: Mon Apr 28 09:37:29 GMT 2008 >> Started rsync for Local Windows PC 1. >> Timestamp: Mon Apr 28 09:37:29 GMT 2008 >> Checking for existing SSH tunnels. >> Timestamp: Mon Apr 28 09:37:29 GMT 2008 >> Testing SSH connection to 192.168.1.100. chmod: /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.192.168.1.100.dropbear: No such file or directory >> Test SSH Connection PID: 1987 >> ERROR connecting to host! >> Completed backup attempt for Local Windows PC 1 in 62 seconds. >> Timestamp: Mon Apr 28 09:38:31 GMT 2008 I think that the reason is my confusion about the names of the private keys. - cp /mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.192.168.200.101.openssh - chmod 0600 /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh - chown root.root /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh - dropbearconvert openssh dropbear /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear - rm /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh In the first line above you write IP of your DNS-323 (I guess) in the name of the private key. I assumed that all following keys shall have the same name, i.e. all "localhost" strings shall be replaced by the same string as in the first line ("192.168.200.101" in this case). Of some reason my DNS-323 changes IP from time to time and I thought that I would be a smart ass to give all the keys the name with the name string of my DNS included, not the IP address that can be changed any time. That's why my commands looked like follows: - cp /mnt/HD_a2/fun_plug.d/etc/dropbear/bob_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.dlink-3ee2a5.openssh - chmod 0600 /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.dlink-3ee2a5.openssh - chown root.root /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.dlink-3ee2a5.openssh - dropbearconvert openssh dropbear /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.dlink-3ee2a5.openssh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.dlink-3ee2a5.dropbear - rm /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.dlink-3ee2a5.openssh Probably that was a wrong move but when I look at the error message in the log file I see that the IPs mismatch anyway. We have following: - IP as in the first line of your instruction file: 192.168.200.101 - IP in the error message in the log file: 192.168.1.100 - actual IP of my DNS-323: 192.168.0.100 So what name of the remote keys should I use? Must it include the correct IP (it's just a name!)? Regarding the new feature of automated deletion of the backup snapshots I think it is just great! It would make your software almost complete. It would be enough to setup it once and forget about it. A nice installer would make your software truly complete. ;-) I have also a few more questions. I realize that your code is more universal but isn't it an overkill to encrypt all the data when copying from Volume_1 to _2 on a DNS-323? It feels that it would be much less trouble for an inexperienced user like myself if it was possible to skip all SSH stuff. As I see it slows down the backup considerably and makes the setup more complicated. Another question is about the first hour BNC works. What does it do before it starts copying files? I guess I will know it after the first successful backup. :-) I'm asking because I want to limit working hours of the backup program and wonder how short it can actually be. If we say it takes one hour before it starts copying files probably I must allow it to work for at least 2 or three hours then. What do you think? Can you estimate how much data per time unit BNC can backup using the encryption? ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- - For the error in your log file: I think you did correctly in naming the key file. The name itself is not all that important in this case anyway. I think the problem is actually in your backup-config.*.sh file. I think you're still using the "example" backup-config file. Instead, you should rename it to match your DNS-323: mv /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/backup-config.example.sh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/backup-config.dlink-3ee2a5.sh Then you have to use 'vi' to modify the file. It defaults to looking for "192.168.1.100" (TGTSVR setting), which is what the log file says it's trying to connect to. For the TGTSVR setting, you should have "localhost" instead. The 192.168.200.101 I have in my instructions is just the IP address of one of the PCs that I back up using BNC. - I definitely agree on your other points. A good installer would really make BNC much better. Depending on my hobby time available, I'll try to work on this next. Also, it would be nice (faster and easier) if SSH could be skipped for using BNC to backup the DNS-323 disk-to-disk. This is sort of low on my priority list since it currently works fine for my setup. :) - The first hour BNC isn't actually doing much except for the backup itself. There's some small things such as figuring out which files are new (need to be backed up), which probably won't take more than 10 minutes in reality. I just thought 1 hour would be good, just to be safe. If you want the backup to run completely for the first time, it will take a long time! It could be as slow as 1GB per hour. See this thread for more info: http://forum.dsmg600.info/p12417-2008-03-20-15:51:28.html After the first transfer, BNC can effectively backup a LOT of data due to the fact that it only copies file changes through SSH, which are usually very small. Let me know how it goes for you. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- Still problems with the keys. I've edited the backup-config.dlink-3ee2a5.sh file as you said but it still doesn't work. It asks me for a password now: SvcwRsync@localhost's password: ~ # I enter blank but nothing happens then. Here is a quotation from the log: Mon Apr 28 22:19:01 GMT 2008 >> Started rsync for Local Windows PC 1. >> Timestamp: Mon Apr 28 22:24:01 GMT 2008 >> Checking for existing SSH tunnels. >> Timestamp: Mon Apr 28 22:24:01 GMT 2008 >> Testing SSH connection to localhost. chmod: /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear: No such file or directory >> Test SSH Connection PID: 13800 >> ERROR connecting to host! >> Completed backup attempt for Local Windows PC 1 in 62 seconds. >> Timestamp: Mon Apr 28 22:25:03 GMT 2008 As I understand variable TGTSVR ("localhost" in my case) is used later in the same file for defining of variable TGTKEY. Since I don't have any private key with name remote_private_key.localhost.dropbear (mine is remote_private_key.dlink-3ee2a5.dropbear) it asks me for a password. Probably I should rename my keys anyway. I will repeat this lines as follows: - cp /mnt/HD_a2/fun_plug.d/etc/dropbear/bob_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh - chmod 0600 /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh - chown root.root /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh - dropbearconvert openssh dropbear /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear - rm /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.openssh Is this correct way to go? I have one other issue. Last time when I tried to copy BackupNetClone.1.0.0.tgz into fun_plug.d/bin/BackupNetClone via Explorer (or ftp) I couldn't (no sufficient rights) even if I was logged in as root. I had to copy the file under the root first and then move it in Putty then. This is not so much of a problem though - I won't access fun_plug.d by Explorer so often. :-) ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- Oh, yep, you're right. I forgot the key name was made from the target server name, so if you have TGTSVR as "localhost", then your key should have that same name, as you suggest. If this seems to weird, I could add a setting in the backup-config.sh file to specify what the key name is... Hm, yeah you probably don't have permissions set on the fun_plug.d/bin/BackupNetClone directory for anyone except root to write to it. I recommend leaving it this way actually. I'll change the instructions to match your findings. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I changed the keys again as I said in my previous letter and started BNC. Everything looked fine (no warnings nor questions) and I was very hopeful. However, when I interrupted the application after an hour and asked for the storage directory: cat /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/logs/last-rsync-info.* I got the answer: cat: can't open '/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/logs/last-rsync-info.*': No such file or directory It looks like BNC has not done anything during this hour. A new directory Auto-Backup Snapshots has been created on Volume_2 but it is completely empty. ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- It looks like BNC was successful! What happened was that BackupNetClone was waiting for your input for a question that only comes up once ever. The question should have been answered by a previous step in the instructions, but that might have failed if the settings weren't right. So to move forward, you need to go back and execute the step in the instructions that says "SSH once to each target". What should happen is that the following text will appear: Host 'localhost' is not in the trusted hosts file. (fingerprint md5 da:84:e2:f5:36:1e:b3:73:07:91:da:fa:20:c4:26:33) Do you want to continue connecting? (y/n) Hit 'Y', and you should get something like: -rw-r--r-- 1 root root 116 Dec 27 2005 welcome.msg Let me know if you don't get that question. If not, then I might be missing a step in the instructions. If you do get the question and successfully answer it, then try the command again. If it doesn't ask the question any more, then you know you've connected successfully through SSH and BNC should run fine from then on. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I SSHed the target the first time. Probably I had to repeat it since I renamed my keys. Anyhow I did it again, got the question again, answered yes again. Still doesn't work. Same simptoms: empty Auto-Backup Snapshots directory and No such file or directory answer when I try cat last-rsync-info. ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- So it sounds like every time you do the SSH command, it asks you the question again. If that is the case, then there must be something wrong with the saving of that information (in the known_hosts file). Try entering the following commands to make sure your known_hosts file is setup propertly: login (be sure to login as 'root' with the appropriate password) mkdir "${HOME}/.ssh" (don't worry if it complains that it already exists) chmod 600 "${HOME}/.ssh" touch "${HOME}/.ssh/known_hosts" chmod 644 "${HOME}/.ssh/known_hosts" Then after doing this, perform the SSH command again to make sure it's done as the root user. Do this a couple times to see if it stops asking you the question about adding it to the trusted hosts file. If this doesn't work, I'll have to think about it for a bit... ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I think it asked me the question about trusted host again because I'd renamed the keys (from "dlink-3ee2a5" to "localhost"). It doesn't ask now. However, I entered your lines from the last letter anyway just for to be sure. I get the following answer when I SSH Rsync: ssh -i "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear" "SvcwRsync@192.168.0.199" -p 22 -T "ls -al" drwxr-xr-x 3 SvcwRsyn root 4096 Apr 18 22:07 . drwxr-xr-x 4 root root 4096 Apr 14 22:41 .. drw------- 2 SvcwRsyn root 4096 Apr 29 21:38 .ssh Note that I enter IP for SvcwRsync@192.168.0.199 and not "localhost". Of some reason I get error message when I enter "localhost": ~ # ssh -i "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear" "SvcwRsync@localhost" -p 22 -T "ls -al" Host 'localhost' is not in the trusted hosts file. (fingerprint md5 da:84:e2:f5:36:1e:b3:73:07:91:da:fa:20:c4:26:33) Do you want to continue connecting? (y/n) y ssh: connection to SvcwRsync@localhost:22 exited: Didn't validate host key Backup still doesn't work with the same symptoms as before. See attached logfile. Can we add some debug lines somewhere to figure out what the problem is? ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- This is very puzzling. My best guess currently is that since you can SSH without problem to 192.168.0.199, then the SSH server (dropbear) on your DNS-323 is not configured 100% correctly. I think it centers around the /mnt/HD_a2/fun_plug.d/etc/dropbear directory, which I remember you had problems creating initially. Let's try recreating that directory and resetting the dropbear SSH server: make sure to login as root sh /mnt/HD_a2/fun_plug.d/start/dropbear.sh stop (stops the SSH server on the DNS-323) rm /mnt/HD_a2/fun_plug.d/home/root/.ssh/authorized_keys (removes the authorized_keys file since we'll be recreating it later) mv /mnt/HD_a2/fun_plug.d/etc/dropbear /mnt/HD_a2/fun_plug.d/etc/dropbear_old (renames the etc/dropbear directory so that we don't use it any more) sh /mnt/HD_a2/fun_plug.d/start/dropbear.sh start (starts dropbear SSH server again, which auto-creates etc/dropbear and creates a private/public key pair) sh /mnt/HD_a2/fun_plug.d/start/dropbear.sh stop (stops the SSH server on the DNS-323 while we change the keys back to the one you made with puttygen) now follow all the instructions in the [convert the SSH public/private key pair into something dropbear can use] section again, but after the third step (chmod 600 ...openssh) add the following: chmod 600 /mnt/HD_a2/fun_plug.d/etc/dropbear/dropbear_rsa_host_key Ok, now after all this, restart the DNS-323. Then try the 'ssh -i' command again (twice) to see if the question is asked once and then never again. If it is still asked numerous times, there is, unfortunately, no debug information that we can turn on since the whole problem lies within the ssh command. Here's a small summary of what I think happens (I'm not 100% sure) when you run the SSH command, which might help reveal any issues. In this case, it's a conversation between the client (the one running the ssh command, requesting the directory listing) and the server (the one running dropbear as the SSH server, and the one from whom the directory listing should be retrieved): client: ssh to server on port 22, using the private key 'remote_private_key.localhost.dropbear', and try to run the 'ls -al' command on the server and send me back the results server: sure, here's my public key so you (the client) can verify that I'm the correct server client: oh, let me check my list of acceptable servers (in known_hosts) to make sure your public key is listed nope, I don't see it, I'll ask the user if it's ok to continue: "Host 'localhost' is not in the trusted hosts file..." ok, the user says it's ok to add you (the server) to my list of acceptable servers; let's continue server: ok, now let me check if the key you gave me is authorized to login (check that public part of remote_private_key.localhost.dropbear is in the authorized_keys file) yep, you're public key is acceptable now let me check that the private part of the key matches the public key (checks using an algorithm to see if they match) yep, they match; what would you like me to do? client: I would like you to perform the 'ls -la' command and send me the results server: ls -la (in whatever directory is the home directory for the user under which the dropbear SSH server was started, in this case root) here's the text generated by that command... client: thanks, bye now Oh, and another thing to verify the dropbear server is working properly on your DNS-323 is to do the WinSCP steps. If you can SCP into the DNS-323 from any other computer, then we know the SSH server is working correctly and that the problem is with the SSH client. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I did everything as you said. Everything worked without warnings. When I SSHed SvcwRsync it didn't ask me any questions at all this time. I've tried both SvcwRsync@localhost and SvcwRsync@192.168.0.199 - no questions either time. I also rerun [configure rsync server to run on DNS-323] section just to be sure. However, when I started BNC again it stopped by itself after 5 minutes. In the log file it complains that the "path_to_backup" module is missing (pls, see the attachment). I don't remember having this problem last time. At least it's something new (I think) that might help us so solve the problem. ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- Now you just need to correct your backup-config.dlink-3ee2a5.sh file. Here's some settings that I think you should use, if they're not already set as such: TGTDSC="DNS-323 Main Disk" (This is instead of "Local Windows PC 1", because you're not really backing up a Windows PC, so that example description is not valid.) TGTSVR="localhost" (This should already be set as such.) TGTPRT, TGTUSR, RSYNC_PASSWORD will all be fine as default. TGTSHR="vol1" (This should match your rsyncd.conf that you set back in step [configure rsync server to run on DNS-323]. This is what's causing the current error, because my default value of "path_to_backup" is just an example.) TGTKEY can be left as-is. TGTEXC="${RTDIR}/exclusions-list.dlink-3ee2a5.txt" (This is for an exclusions list that will help "clean up" your backups. Basically, it's a list of items in the [vol1] location that you don't want backed up. I'll explain more further down.) PRUNEOLDFILES, TGTDST, TGTLOG are fine as default. So, the last thing to do here is to create the exclusions-list.dlink-3ee2a5.txt file, which I had you add to the backup-config. Creating this file as specified will make it so you won't always have BackupNetClone temporary files filling up your backup and making the status messy. Here's the commands to create the file: - mv "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/exclusions-list.example.txt" "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/exclusions-list.dlink-3ee2a5.txt" - vi "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/exclusions-list.dlink-3ee2a5.txt" - add the following two lines after the ...logs/email-status... line: fun_plug.d/bin/BackupNetClone/logs/email-footer.????-??-??.??h??m??s.txt fun_plug.d/bin/BackupNetClone/logs/email-deletionslist.????-??-??.??h??m??s.txt So the your final exclusions list will look like this: fun_plug.d/bin/BackupNetClone/logs/backupnetclone.lock fun_plug.d/bin/BackupNetClone/logs/backupnetclone.log fun_plug.d/bin/BackupNetClone/logs/backupnetclone.log.*.????-??-??.??h??m??s.temp.txt fun_plug.d/bin/BackupNetClone/logs/backupnetclone.log.*.????-??-??.??h??m??s.temp-partial.txt fun_plug.d/bin/BackupNetClone/logs/backupnetclone.log.*.????-??-??.??h??m??s.temp-pruning.txt fun_plug.d/bin/BackupNetClone/logs/email-status.????-??-??.??h??m??s.txt fun_plug.d/bin/BackupNetClone/logs/email-footer.????-??-??.??h??m??s.txt fun_plug.d/bin/BackupNetClone/logs/email-deletionslist.????-??-??.??h??m??s.txt fun_plug.d/bin/BackupNetClone/logs/running-email-status.txt fun_plug.d/bin/BackupNetClone/logs/status-email.subject-list.txt fun_plug.d/bin/BackupNetClone/logs/status-email.times-since-sent.txt fun_plug.d/bin/BackupNetClone/logs/last-rsync-info.*.txt fun_plug.d/bin/BackupNetClone/CVS/ fun_plug.d/log/dropbear.log .systemfile/ ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- It went without problems this time either. At least your latest instructions. However, when I tried to SSH SvcwRsync before starting BNC just to be sure it still works it doesn't. :-O Neither SvcwRsync@192.168.0.199 nor SvcwRsync@localhost. I get error message: ~ # ssh -i "/mnt/HD_a2/fun_plug.d/bin/BackupNetClone/remote_private_key.localhost.dropbear" "SvcwRsync@localhost" -p 22 -T "ls -al" ssh: exited: Error connecting: Connection refused Very strange because it worked earlier today. I worked from different computers though (my PC during the day and now from the Mac) but I don't think it can make any difference, can it? Another small question. When you write that variable TGTSHR should be ="vol1" and should match my rsyncd.conf do you mean that the variable should be exactly as you typed "vol1" or "/mnt/HD_a"? I left it exactly as you typed anyway... Too bad that SSH doesn't work again.:-/ It seems to be the major problem in all the set up. Do you think to repeat all the steps you described two letters ago (recreate dropbear directory and reset the SSH server) would help? ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- It sounds as if the dropbear SSH server is not running. Try the following command: ls -al /mnt/HD_a2/fun_plug.d/start/dropbear.sh Make sure the result looks like: -rwxr-xr-x 1 root root 2026 Jul 22 2007 /mnt/HD_a2/fun_plug.d/start/dropbear.sh which means that dropbear should start automatically after you restart the DNS-323. I don't think you need to repeat any steps to make it work again; perhaps just rebooting the DNS-323 will fix it. If nothing else, you can redo the following command to make sure the dropbear.sh has the right settings: chmod a+x /mnt/HD_a2/fun_plug.d/start/dropbear.sh The TGTSHR should match exactly what I typed--the "vol1" matches what you put in [] (square brackets) in the rsyncd.conf file. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- I restarted DNS-323 as you said and could SSH SvcwRsync@localhost without problems. I started BNC and it worked!!! :-) When I interrupted it after a while some files had already been copied to Volume_2. I asked for incomplete directory and got answer: ~ # cat /mnt/HD_a2/fun_plug.d/bin/BackupNetClone/logs/last-rsync-info.* /mnt/HD_b2/Auto-Backup Snapshots/DNS-323 Main Disk.2008-05-03.23h13m42s This is not an .incomplete directory. Probably that's why when I tried the command: ~ # mv /mnt/HD_b2/* "/mnt/HD_b2/Auto-Backup Snapshots/DNS-323 Main Disk.2008-05-03.23h13m42s.incomplete I got ">" in the prompt and nothing seems happening. Probably the command above was illegal. Should I try: ~ # mv /mnt/HD_b2/* "/mnt/HD_b2/Auto-Backup Snapshots/DNS-323 Main Disk.2008-05-03.23h13m42s instead? I.e. the same but without .incomplete part? Shouldn't I also type mv /mnt/HD_b2/HD_a2/* instead because now rsync copies Volume_1 there (see the screenshot)? ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- I forgot that the first interrupted time it won't have the ".incomplete" word after it. Then the reason you got the ">" prompt was because a quote " was missing from the end of your 'mv' command. And you're right about adding on the HD_a2 part to the command--I didn't realize the HD_a2 directory was there, too. So here's the command that you'll need: mv -f /mnt/HD_b2/HD_a2/* "/mnt/HD_b2/Auto-Backup Snapshots/DNS-323 Main Disk.2008-05-03.23h13m42s" I added the '-f' to make sure it overwrites the contents of the Auto-Backup... directory. ---------------------------------------------------------------------- QUESTION ---------------------------------------------------------------------- When I tried to move the content of HD_a2 directory under Auto-Backup Snapshots as you wrote above (mv -f) I couldn't move one directory (01-foto) that had already been copied by BNC under the first run: mv: cannot rename '/mnt/HD_b2/HD_a2/01-foto': Directory not empty I had to manually remove 01-foto first and then copy the content. No big deal, just wonder why I couldn't move it in Putty. I wonder also how I can stop automated backup by rsync that I have now. I did a setup according to http://forum.dsmg600.info/t1150-Tutorial%3A-Backup-Everything-from-once-night.html and I'm not sure what files I have to delete. Is it only editcron.sh that should be deleted? And one more thing. If I need to change the schedule of the backup I guess it's just to edit vi /mnt/HD_a2/fun_plug.d/start/backupnetclone.sh right? I'm also very curious about how BNC works. Every snapshot seems have a copy of all my Volume_1 but it doesn't take any extra space for that! It looks like magic! Two (and it will be more) instances of the same file take space just for one. Does BNC fool the operating system somehow to show different paths to the same file? ---------------------------------------------------------------------- ANSWER ---------------------------------------------------------------------- Hm, I'm not sure about the problem with the 01-foto directory--perhaps the -f option doesn't function as I thought it would. To disable the other rsync, you can either remove the editcron.sh file: rm /mnt/HD_a2/fun_plug.d/start/editcron.sh or turn it off so it doesn't auto-run when you start the DNS-323: chmod a-x /mnt/HD_a2/fun_plug.d/start/editcron.sh And yep, to change the BNC schedule, edit the start/backupnetclone.sh. As for how BNC stores the files magically, it uses a well-known feature of the Linux operating system called "hard links" (http://en.wikipedia.org/wiki/Hard_link). The idea wasn't mine--there are others who have done the same thing before me in Linux. In fact, the MS Windows "restore points" and Mac's "Time Machine" all use the same idea. They just have a file pointer point to the same spot on the hard disk if the data is the same. It's pretty cool, and it works slick! ----------------------------------------------------------------------