Transfer file to Windows server from Ubuntu












3















I am transferring file to Windows server from Ubuntu with following command:



smbclient //server_ip_add/share -U username


We can use rsync to transfer file from Ubuntu to Ubuntu and then by creating script run it as cronjob. Is it possible to do all this from Ubuntu to Windows?










share|improve this question




















  • 1





    You could mount the samba share on Ubuntu, then there is absolutely no difference on what OS the server is running.

    – Bruni
    Sep 24 '15 at 7:06











  • sorry i don't have thoroughly knowledge of all this. will you please tell me what does it mean- mounting samba share?

    – d a i s y
    Sep 24 '15 at 7:41











  • Mounting the samba share (the smb share) in your Ubuntu system, means that ubuntu will see the share as just another location seamlessly integrated in its filesystem. (it will just seam to be another folder). You could then run rsync just as usual.

    – Bruni
    Sep 24 '15 at 7:54






  • 1





    help.ubuntu.com/community/MountWindowsSharesPermanently here you can find a detailed howto. Use cifs not smbfs.

    – Bruni
    Sep 24 '15 at 8:17
















3















I am transferring file to Windows server from Ubuntu with following command:



smbclient //server_ip_add/share -U username


We can use rsync to transfer file from Ubuntu to Ubuntu and then by creating script run it as cronjob. Is it possible to do all this from Ubuntu to Windows?










share|improve this question




















  • 1





    You could mount the samba share on Ubuntu, then there is absolutely no difference on what OS the server is running.

    – Bruni
    Sep 24 '15 at 7:06











  • sorry i don't have thoroughly knowledge of all this. will you please tell me what does it mean- mounting samba share?

    – d a i s y
    Sep 24 '15 at 7:41











  • Mounting the samba share (the smb share) in your Ubuntu system, means that ubuntu will see the share as just another location seamlessly integrated in its filesystem. (it will just seam to be another folder). You could then run rsync just as usual.

    – Bruni
    Sep 24 '15 at 7:54






  • 1





    help.ubuntu.com/community/MountWindowsSharesPermanently here you can find a detailed howto. Use cifs not smbfs.

    – Bruni
    Sep 24 '15 at 8:17














3












3








3


2






I am transferring file to Windows server from Ubuntu with following command:



smbclient //server_ip_add/share -U username


We can use rsync to transfer file from Ubuntu to Ubuntu and then by creating script run it as cronjob. Is it possible to do all this from Ubuntu to Windows?










share|improve this question
















I am transferring file to Windows server from Ubuntu with following command:



smbclient //server_ip_add/share -U username


We can use rsync to transfer file from Ubuntu to Ubuntu and then by creating script run it as cronjob. Is it possible to do all this from Ubuntu to Windows?







command-line rsync transfer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 11 mins ago







d a i s y

















asked Sep 24 '15 at 6:49









d a i s yd a i s y

3,33782344




3,33782344








  • 1





    You could mount the samba share on Ubuntu, then there is absolutely no difference on what OS the server is running.

    – Bruni
    Sep 24 '15 at 7:06











  • sorry i don't have thoroughly knowledge of all this. will you please tell me what does it mean- mounting samba share?

    – d a i s y
    Sep 24 '15 at 7:41











  • Mounting the samba share (the smb share) in your Ubuntu system, means that ubuntu will see the share as just another location seamlessly integrated in its filesystem. (it will just seam to be another folder). You could then run rsync just as usual.

    – Bruni
    Sep 24 '15 at 7:54






  • 1





    help.ubuntu.com/community/MountWindowsSharesPermanently here you can find a detailed howto. Use cifs not smbfs.

    – Bruni
    Sep 24 '15 at 8:17














  • 1





    You could mount the samba share on Ubuntu, then there is absolutely no difference on what OS the server is running.

    – Bruni
    Sep 24 '15 at 7:06











  • sorry i don't have thoroughly knowledge of all this. will you please tell me what does it mean- mounting samba share?

    – d a i s y
    Sep 24 '15 at 7:41











  • Mounting the samba share (the smb share) in your Ubuntu system, means that ubuntu will see the share as just another location seamlessly integrated in its filesystem. (it will just seam to be another folder). You could then run rsync just as usual.

    – Bruni
    Sep 24 '15 at 7:54






  • 1





    help.ubuntu.com/community/MountWindowsSharesPermanently here you can find a detailed howto. Use cifs not smbfs.

    – Bruni
    Sep 24 '15 at 8:17








1




1





You could mount the samba share on Ubuntu, then there is absolutely no difference on what OS the server is running.

– Bruni
Sep 24 '15 at 7:06





You could mount the samba share on Ubuntu, then there is absolutely no difference on what OS the server is running.

– Bruni
Sep 24 '15 at 7:06













sorry i don't have thoroughly knowledge of all this. will you please tell me what does it mean- mounting samba share?

– d a i s y
Sep 24 '15 at 7:41





sorry i don't have thoroughly knowledge of all this. will you please tell me what does it mean- mounting samba share?

– d a i s y
Sep 24 '15 at 7:41













Mounting the samba share (the smb share) in your Ubuntu system, means that ubuntu will see the share as just another location seamlessly integrated in its filesystem. (it will just seam to be another folder). You could then run rsync just as usual.

– Bruni
Sep 24 '15 at 7:54





Mounting the samba share (the smb share) in your Ubuntu system, means that ubuntu will see the share as just another location seamlessly integrated in its filesystem. (it will just seam to be another folder). You could then run rsync just as usual.

– Bruni
Sep 24 '15 at 7:54




1




1





help.ubuntu.com/community/MountWindowsSharesPermanently here you can find a detailed howto. Use cifs not smbfs.

– Bruni
Sep 24 '15 at 8:17





help.ubuntu.com/community/MountWindowsSharesPermanently here you can find a detailed howto. Use cifs not smbfs.

– Bruni
Sep 24 '15 at 8:17










2 Answers
2






active

oldest

votes


















13














I used MountWindowsSharesPermanently method to transfer file via rsync automatically.



First I mount a windows share folder (or map network drive) to which i want to transfer file with following method:



sudo mkdir /media/BACKUP
sudo mount -t cifs -o username=domainusername //ip_add/ShareFolder /media/BACKUP


then use rsync to transfer file:



sudo rsync -azp /path/to/source /media/BACKUP/ShareFolder


Create script,make it executable and schedule a cronjob.



Now if you reboot the system, it will be unmounted. So to mount it permanently, do following:



Open terminal & run:



sudo gedit /etc/fstab


Edit:



//ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,sec=ntlm 0 0


Here .smbcredentials is a credential file created in home directory



To create it, run gedit ~/.smbcredentials



Edit:



username=domainusername
password=Password


save & close it.



UPDATE: For Ubuntu 16.04.3, and 18.04, edit vers=1.0



//ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0,sec=ntlm 0 0





share|improve this answer

































    1














    There is a tool for Windows that implements rsync. It is called cwrsync and is published by itefix.



    It has packaged rsync and cygwin with the sole purpose to give a simple solution to install rsync on windows.



    This link gives a step-by-step description of how to set it up and how to use it.



    Obviously, itefix publish their own documentation.



    I've used it successfully to copy 2GB+ of attachments over from a Ubuntu server to an IIS7 server. The attachments were part of a database application.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f677773%2ftransfer-file-to-windows-server-from-ubuntu%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      13














      I used MountWindowsSharesPermanently method to transfer file via rsync automatically.



      First I mount a windows share folder (or map network drive) to which i want to transfer file with following method:



      sudo mkdir /media/BACKUP
      sudo mount -t cifs -o username=domainusername //ip_add/ShareFolder /media/BACKUP


      then use rsync to transfer file:



      sudo rsync -azp /path/to/source /media/BACKUP/ShareFolder


      Create script,make it executable and schedule a cronjob.



      Now if you reboot the system, it will be unmounted. So to mount it permanently, do following:



      Open terminal & run:



      sudo gedit /etc/fstab


      Edit:



      //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,sec=ntlm 0 0


      Here .smbcredentials is a credential file created in home directory



      To create it, run gedit ~/.smbcredentials



      Edit:



      username=domainusername
      password=Password


      save & close it.



      UPDATE: For Ubuntu 16.04.3, and 18.04, edit vers=1.0



      //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0,sec=ntlm 0 0





      share|improve this answer






























        13














        I used MountWindowsSharesPermanently method to transfer file via rsync automatically.



        First I mount a windows share folder (or map network drive) to which i want to transfer file with following method:



        sudo mkdir /media/BACKUP
        sudo mount -t cifs -o username=domainusername //ip_add/ShareFolder /media/BACKUP


        then use rsync to transfer file:



        sudo rsync -azp /path/to/source /media/BACKUP/ShareFolder


        Create script,make it executable and schedule a cronjob.



        Now if you reboot the system, it will be unmounted. So to mount it permanently, do following:



        Open terminal & run:



        sudo gedit /etc/fstab


        Edit:



        //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,sec=ntlm 0 0


        Here .smbcredentials is a credential file created in home directory



        To create it, run gedit ~/.smbcredentials



        Edit:



        username=domainusername
        password=Password


        save & close it.



        UPDATE: For Ubuntu 16.04.3, and 18.04, edit vers=1.0



        //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0,sec=ntlm 0 0





        share|improve this answer




























          13












          13








          13







          I used MountWindowsSharesPermanently method to transfer file via rsync automatically.



          First I mount a windows share folder (or map network drive) to which i want to transfer file with following method:



          sudo mkdir /media/BACKUP
          sudo mount -t cifs -o username=domainusername //ip_add/ShareFolder /media/BACKUP


          then use rsync to transfer file:



          sudo rsync -azp /path/to/source /media/BACKUP/ShareFolder


          Create script,make it executable and schedule a cronjob.



          Now if you reboot the system, it will be unmounted. So to mount it permanently, do following:



          Open terminal & run:



          sudo gedit /etc/fstab


          Edit:



          //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,sec=ntlm 0 0


          Here .smbcredentials is a credential file created in home directory



          To create it, run gedit ~/.smbcredentials



          Edit:



          username=domainusername
          password=Password


          save & close it.



          UPDATE: For Ubuntu 16.04.3, and 18.04, edit vers=1.0



          //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0,sec=ntlm 0 0





          share|improve this answer















          I used MountWindowsSharesPermanently method to transfer file via rsync automatically.



          First I mount a windows share folder (or map network drive) to which i want to transfer file with following method:



          sudo mkdir /media/BACKUP
          sudo mount -t cifs -o username=domainusername //ip_add/ShareFolder /media/BACKUP


          then use rsync to transfer file:



          sudo rsync -azp /path/to/source /media/BACKUP/ShareFolder


          Create script,make it executable and schedule a cronjob.



          Now if you reboot the system, it will be unmounted. So to mount it permanently, do following:



          Open terminal & run:



          sudo gedit /etc/fstab


          Edit:



          //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,sec=ntlm 0 0


          Here .smbcredentials is a credential file created in home directory



          To create it, run gedit ~/.smbcredentials



          Edit:



          username=domainusername
          password=Password


          save & close it.



          UPDATE: For Ubuntu 16.04.3, and 18.04, edit vers=1.0



          //ip_add/ShareFolder /media/BACKUP/ cifs credentials=/home/username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0,sec=ntlm 0 0






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 20 '18 at 9:43

























          answered Sep 25 '15 at 5:59









          d a i s yd a i s y

          3,33782344




          3,33782344

























              1














              There is a tool for Windows that implements rsync. It is called cwrsync and is published by itefix.



              It has packaged rsync and cygwin with the sole purpose to give a simple solution to install rsync on windows.



              This link gives a step-by-step description of how to set it up and how to use it.



              Obviously, itefix publish their own documentation.



              I've used it successfully to copy 2GB+ of attachments over from a Ubuntu server to an IIS7 server. The attachments were part of a database application.






              share|improve this answer




























                1














                There is a tool for Windows that implements rsync. It is called cwrsync and is published by itefix.



                It has packaged rsync and cygwin with the sole purpose to give a simple solution to install rsync on windows.



                This link gives a step-by-step description of how to set it up and how to use it.



                Obviously, itefix publish their own documentation.



                I've used it successfully to copy 2GB+ of attachments over from a Ubuntu server to an IIS7 server. The attachments were part of a database application.






                share|improve this answer


























                  1












                  1








                  1







                  There is a tool for Windows that implements rsync. It is called cwrsync and is published by itefix.



                  It has packaged rsync and cygwin with the sole purpose to give a simple solution to install rsync on windows.



                  This link gives a step-by-step description of how to set it up and how to use it.



                  Obviously, itefix publish their own documentation.



                  I've used it successfully to copy 2GB+ of attachments over from a Ubuntu server to an IIS7 server. The attachments were part of a database application.






                  share|improve this answer













                  There is a tool for Windows that implements rsync. It is called cwrsync and is published by itefix.



                  It has packaged rsync and cygwin with the sole purpose to give a simple solution to install rsync on windows.



                  This link gives a step-by-step description of how to set it up and how to use it.



                  Obviously, itefix publish their own documentation.



                  I've used it successfully to copy 2GB+ of attachments over from a Ubuntu server to an IIS7 server. The attachments were part of a database application.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 25 '15 at 4:57









                  NZDNZD

                  1,946617




                  1,946617






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f677773%2ftransfer-file-to-windows-server-from-ubuntu%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      GameSpot

                      日野市

                      Tu-95轟炸機