7

My problem is that I need to backup the files on my Linux machine to my Windows laptop. My external hard drive died, and so backing up to an external drive is out of the question for the time being.

These are the methods I've tried:

  • Samba
  • Samba with Gadwin GUI
  • Windows Shared Folder, Wirelessly (I can't access it, even though both machines indicate a connection)

I don't want to try Samba again, because it's just too complex for me -- the 15-odd tutorials I used were either incomplete or assumed too much knowledge on the part of the reader. I've spent about 8 hours trying to make it work and I give up.

I've heard that you can connect two computers with an ethernet cable. Only problem is that it's not a cross-over cable, and I don't have a router, so they would have to be directly connected with a regular rj-45 cable.

I don't want to upload files to the cloud, because I have a lot of files to transfer and want it to be speedy.

21
  • 2
    You can use something like WinSCP or other Windows ssh / scp client to access the Linux machine after you set up an ssh server. Basic samba set-up is very simple as well. Perhaps you were looking at the wrong tutorials.
    – jw013
    Commented Oct 21, 2014 at 18:30
  • 1
    Have you tried NitroShare? It's a small app you install on the Linux and Windows machines. The apps will discover each other on the network and allow files to be "dragged-and-dropped" back and forth. (Disclaimer: I'm the author.) Commented Oct 21, 2014 at 18:47
  • 1
    @user8547 There is no general answer for that, as every protocol has advantages and disadvantages. I personally would prefer FTP with a program that implements commands like mget and mput (so there is no need to package the files before transfer, and the transfer can be done in both directions). The problem with FTP is that it requires a firewall to be configured appropriately, so that opening additional ports (for the actual data transfer) is possible.
    – Abrixas2
    Commented Oct 21, 2014 at 18:51
  • 1
    @user8547 Add the Ubuntu Repos to Mint then use Software Manager and search. Just keep your Mint Update Settings at the default of 2
    – eyoung100
    Commented Oct 21, 2014 at 19:03
  • 1
    Ah, here we go: answers.launchpad.net/nitroshare/+question/241382#comment-0 Those instructions should hopefully work for Mint if you need them. But I'd strongly suggest trying the DEB first. Commented Oct 21, 2014 at 19:12

4 Answers 4

8

Please do not get discouraged by the overwhelming amount of information in setting up of samba. It's pretty simple as discussed here.

If you do not believe, these are the steps I did in my machine and it took me just couple of minutes to access the mount point of my RHEL machine on the Windows machine. I assume the RHEL and Windows machine are available in the same network.

Let us go one baby step at a time and it would make your experience smoother.

Step 1: Installation

yum install samba

Now, we will configure the firewall to open up some ports for samba.

Step 2: Firewall Configuration

To achieve this, run the Firewall Configuration tool by selecting the System -> Administration -> Firewall menu option.

Step 3: Edit the configuration file

Edit /etc/samba/smb.conf file to make some changes. The only change I made was, to add the below information to the end of the file.

[tmp]
        path = /tmp
        writeable = yes
        browseable = yes
        valid users = demo

As we can see, I am sharing the /tmp share and allowing the user demo to access the share from the windows machine.

Step 4: Add the user

In your Linux machine, add the local user by running adduser demo and then run the command smbpasswd -a demo and set a password.

Step 5: Start the required services

This is the final step and we are done.

service smb start
service nmb start

Now, login to the windows machine and from Networks tab you could see that your Linux share is available for you.

EDIT

As you had mentioned you use Mint for Linux, your steps could be something as below. The configuration file for smb.conf is the same as RHEL machines and the online tutorial could be accessed from here.

sudo apt-get install samba
sudo restart smbd
sudo testparm
3
  • What do I do after opening up the firewall? I use Gufw. The firewall is off.
    – whitewings
    Commented Oct 21, 2014 at 18:54
  • @user8547, if the firewall is off you can ignore the second step.
    – Ramesh
    Commented Oct 21, 2014 at 18:54
  • Thanks Ramesh, but I'm going to use NitroShare. But this will be useful for other, more brave souls who want to try Samba. :)
    – whitewings
    Commented Oct 21, 2014 at 19:33
4

NitroShare may be able to do what you're looking for. It is a small app that allows files to quickly be sent between machines on the same network.

Once installed on both your Linux and Windows machines, the two machines should automatically discover each other. Use the menu in the system tray to send a file or directory to a specific machine on the network:

enter image description here

Download links are available here.

10
  • While this is a great program for moving a small amount of files, it's not so good if you want to move, say, 50 gigabytes of data. For that it would be better to use an ethernet connection. I tried moving a few 1gb files and it took roughly 40 minutes for each. Which is too long if you want to move 50+ gb's of data. Incidentally there are a couple alternatives to NitroShare, but I haven't tested them, as I assume they would move files at a similar speed.
    – whitewings
    Commented Oct 22, 2014 at 5:11
  • EDIT: I meant it took about 15 minutes to transfer a 1 gb file, not 40 minutes. Maybe I'm being picky, but I'd like a speedier solution to moving files across two computers.
    – whitewings
    Commented Oct 22, 2014 at 5:20
  • @user8547: I've been doing some intense optimization on the application and have reached the point where NitroShare actually beats SMB on some benchmarks. If you're interested in testing the new version, there are packages/installers here: nitroshare.net The share boxes are missing but you can use the tray icon to send files or directories. And there is no longer a limit on filesize. Commented Mar 4, 2015 at 18:43
  • Sounds great! I'd need two computers to test it out, which I don't have right now. But I will definitely check it out at some point.
    – whitewings
    Commented Mar 5, 2015 at 14:54
  • I tested the new version. One laptop was running Windows 7 Starter Edition and other was running Linux Mint 17.1. I transfered three 1gb video files and it took 45 minutes. I then transferred one 1 gb video file and it took 15 minutes. So I don't see an improvement on the earlier version as far as transfer times.
    – whitewings
    Commented Apr 16, 2015 at 16:13
4

How do you connect to the internet? Wireless? That's slower than cable but should work if you can get an IP for both PCs.

From experience, WinSCP gives the least problems transfering files and dealing with reconnects, etc. (on Windows)

Your Linux machine probably already has ssh activated, so on Windows you only download WinSCP, enter the IP, username, password and you are ready to go.

0

Cross-over Ethernet cables are largely obsolete as pretty much every NIC and switch supports Auto MDI-X these days. You can use a regular straight-through Ethernet cable and the NICs will just "figure it out" on their own.

If you are connecting PCs directly (without a router or other DHCP server), you'll need to set static IP addresses on both systems. For example, 192.168.1.40/24 and 192.168.1.41/24.

After you can ping the Linux box from the Windows box, then you can use SSH or Samba or whatever you want to actually push the files. I specifiy pinging in this direction because Windows firewall is braindead and defaults to blocking ICMP echo requests (pings).

1
  • So I'd have to use Samba in addition? I thought if I just connected the ethernet cable to each computer then each computer would show up in each other's networks and I could navigate and move files freely between them.
    – whitewings
    Commented Oct 22, 2014 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .