Announcement

Collapse
No announcement yet.

Synchronise via NAS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Synchronise via NAS

    Want to synchronise between laptop and desktop via a third party (hard disk attached to router).

    Problem 1 - laptop and server are never on at the same time. Hence the NAS. Possible solution! However...

    Problem 2 - NAS doesn't run programs so I can't use rsync. Unison neither. They need to be resident on the one you synchronise with.

    Only way to talk to the storage disk seems to be with FTP. Has to be synchronise because I need to do the whole user folder.

    Can anyone help, please?

    #2
    Re: Synchronise via NAS

    Hi,

    Just an idea, but I've seen this pages with wget... (it's in french)
    http://wiki.monserveurperso.com/wakk...i=MirroringFTP

    Just all in short, you should try to do it by the wget command :
    wget --mirror ftp://userass@ip/
    or
    wget --recursive ftp://userass@ip

    Hope it helps

    Comment


      #3
      Re: Synchronise via NAS

      Je vais l'essayer! C'est tres dificile - mais c'est tres necessaire!!
      Sorry - my french aint that good!

      Comment


        #4
        Re: Synchronise via NAS

        I was thinking about something, can't you mount the nas drive by samba ? If yes, then it's like synchronizing between two local folders...
        What is the mark of your nas ?

        Comment


          #5
          Re: Synchronise via NAS

          My NAS drive is also a samba server.
          I had read a little - and people said FTP was best and Samba was not a good idea.
          Also that Samba was really if there were Windows clients about.
          I expect there always will be!
          I am too new at this to argue!

          My NAS has a samba server as well as an FTP server.
          However apart from creating a folder there is nothing else I can do.
          So I installed SWAT from Adept, but it is not listed in the KMenu.
          If I type SWAT or even sudo swat - nothing happens!

          I am not sure where to go from here to achieve the backing up of files from computer to NAS.

          localhost:901 does nothing either, nor localhost/swat

          Will try switching on and off again to see if it magically appears.

          Comment


            #6
            Re: Synchronise via NAS

            Hi,

            You don't need to install swat to access to a samba share, you just need samba (if not installed already). So you can install it :
            sudo apt-get install samba
            Then, from a konqueror window, type in the address :
            smb://user@<nas_ip>/<Folder>

            If it's working, then you will be able to create a mount point on your laptop and desktop to the nas, then sync...

            Hope it helps

            Comment


              #7
              Re: Synchronise via NAS

              OK - I can access it. In fact, via FTP, I'd already transferred files up there, so I got to them!

              Now, the original problem - synhronising them!

              Whether via FTP or via Samba I need some program to do that, don't I?
              Something just updates changed and new files, etc.

              I thought you were saying Samba had this facility built in - perhaps just like rsync and goodness knows what else I've looked at!

              I assumed SWAT was the front end to use samba...

              Comment


                #8
                Re: Synchronise via NAS

                I notice there are loads of threads about SWAT - no one can get it to work!!

                Comment


                  #9
                  Re: Synchronise via NAS

                  Hi,

                  In fact, swat is unneedful here cause it's a Samba Web Administration Tool, it will help you to configure the share on your laptop, not the share of the NAS to mount on your laptop.
                  Even, you don't really need samba to mount your nas, you should be able to use cifs. Do you know folders share names on your nas ? If yes, just try this command :
                  sudo mkdir /tmp/test
                  sudo mount //<nas_ip>/<Share_Name> /tmp/test -t cifs -o username=<nas_user>,password=<nas_password>,uid=<l ocal_user>,rw

                  Then if you get your nas mounted, on this folder, you can add a line like this in /etc/fstab to mount it everytime possible :
                  //<nas_ip>/<Share_Name> <mount_point_of_your_choice> cifs username=<nas_user>,password=<nas_password>,uid=<l ocal_user>,rw,umask=000 0 0

                  Hope it helps

                  Comment


                    #10
                    Re: Synchronise via NAS

                    I think the NAS is mounted - I can access it and transfer files there.
                    I did it with ftp the first time. I can access it via samba somehow (I think that had something to do with avahi and zeroconf, though zeroconf doesn't seem to find anything now!).
                    I now need something that with a script perhaps compares and updates from my laptop using samba.

                    Then I can wake up my desktop and synchronise it to the NAS.
                    Thus, via the NAS synchronise the laptop and desktop.

                    If this samba is set up and OK, I tried to find out if there is a command line (like there was with rsync) that updated etc. Like rsync -av .
                    But I got lost. Too much!!

                    Comment


                      #11
                      Re: Synchronise via NAS

                      Hi,

                      Can you tell me if the command I gave you are working ? To see if it's mounted, you can type :
                      Code:
                      mount
                      And you should see the ip address of your nas and the mount point you gave.

                      Then, modify the /etc/fstab like I said, don't forget to create the path where you want to mount the nas first.

                      Finally, you should try to use the commands from last topic we were discussing on, no ?

                      PS : In fact, you will not use ftp for this, it would be quite complicated (At least for me) using just samba mount (or cifs) will be enough.
                      Cheers

                      Comment


                        #12
                        Re: Synchronise via NAS

                        You're very patient - thank you! Even words like 'share', 'mount' and so on throw me!
                        I had no idea you had to 'mount' something when it is already there on the network.

                        However I did follow your instructions>>
                        sudo mount //<nas_ip>/<Share_Name> /tmp/test -t cifs -o username=<nas_user>,password=<nas_password>,uid=<l ocal_user>,rw

                        and I typed in>>
                        sudo mount //192.168.2.2/jon /tmp/test -t cifs -o username=admin,password=*******,uid=jon,rw

                        and it said>>
                        mount: Not a directory

                        /jon is a directory though - I get there in Konqueror by typing>>
                        smb://jon@ting/jon

                        (The NAS is called ting - chinese for memory!)
                        I assume the uid is the local user on my computer (anyway they're both the same at present)

                        Comment


                          #13
                          Re: Synchronise via NAS

                          I typed in your next suggestion anyway>>
                          //<nas_ip>/<Share_Name> <mount_point_of_your_choice> cifs username=<nas_user>,password=<nas_password>,uid=<l ocal_user>,rw,umask=000 0 0

                          For 'mount of your choice' I just copied from the other lines in fstab and put media/nas
                          Hope that's OK!
                          A window came up - new media found - asking if it wanted me to open it in a new window.
                          I said yes but nothing happened.
                          I changed the 'mount of your choice' to mnt/nas but again nothing.

                          Typing mount in Konsole does not give any listing with the IP address!

                          Comment


                            #14
                            Re: Synchronise via NAS

                            In fact, you have to create first the folder where you want it to be mounted, like /mnt/nas.
                            Code:
                            sudo mkdir /mnt/nas
                            Did you try the first command ? First to mount manually the drive ?

                            Comment


                              #15
                              Re: Synchronise via NAS

                              I did that - thanks>>
                              sudo mkdir /mnt/nas
                              I now have an Unmounted Samba Microsoft Network Share folder!

                              I added to fstab>>
                              //192.168.2.2/jon /mnt/nas cifs username=admin,password=*******,uid=jon,rw,umask=0 00 0 0

                              If I type>>
                              mount
                              I get a whole listing but nothing with mnt or nas or an IP address

                              TYping>>
                              sudo mount //192.168.2.2/jon /tmp/test -t cifs -o username=jon,password=*******,uid=jon,rw

                              gives the response>>
                              mount: Not a directory

                              Comment

                              Working...
                              X