You have been successful with your latest Raspberry Pi project. Perhaps you use it to create photos, music, or even videos? Be that as it may, at some point you will need an easy way to get data from the Pi’s SD card to your PC’s hard drive.

It can be difficult.

With little to no support for cloud services, the answer comes in the form of removable media, email, and LAN tricks. If you’ve ever had to copy data to or from your Raspberry Pi and run into problems, these five methods will help you in the future.

1. Send data by email

This is probably the most obvious option — this is, of course, the first thing I tried. By accessing the Raspberry Pi’s default email client (Claws Mail by PIXEL’s desktop version of Raspbian Jessie), it’s easy to set up an email account, add an attachment, and send data.

5 Ways to Copy Data from Raspberry Pi to Computer

You may prefer accessing Gmail through the Chromium web browser—either of these options will work.

How you send an email is up to you. If you’re using Gmail, you’ll be able to save the message as a draft. Then when you sign into Gmail on your main PC, it will be there. Otherwise, if you’re using an email client, just email it to your own address or another email account you have access to.

If you don’t have a second email account, but you do have a Facebook account, then you have a Facebook email account. In compression, send data to it.

2. Access to cloud storage in a browser

Another obvious but slow option is to access one of your cloud accounts and sync your data that way. Unfortunately, none of the known cloud services offer applications for the Raspberry Pi, so it’s best to upload files through the Chromium browser.

But which service should you use?

Dropbox and Box are accessible through the browser but are slow. Meanwhile, OneDrive and Google Drive are practically unusable. We suggest sticking with what you find most useful.

3. Use a USB stick

Another smart choice is to use a USB stick. Simply insert the formatted disk into a free USB port on your Raspberry Pi and wait for it to appear in the Raspbian file manager. If you’re using an old Pi or Raspberry Pi Zero and don’t have enough USB ports, then it’s time to use a USB hub. While a standard USB hub is fine for a USB flash drive, be aware that devices that will be powered by the Pi will require a powered hub.

5 Ways to Copy Data from Raspberry Pi to muo rpi USB Drive

When a USB drive is connected, it should automatically connect. If not, you need to mount it manually. Start by looking for a unique ID:

ls -l /dev/disk/by-uuid/ 

Typically, you will find an entry named sda1 (although it may be different), so make a note of the name before continuing.

Next, create a mount point. Essentially, this is a directory that will display the contents of the disk.

 sudo mkdir /media/usb 

(You don’t have to call it «usb», but it helps.)

Then make sure the Pi user owns the folder. Otherwise, you won’t be able to view the content!

 sudo chown -R pi:pi /media/usb 

You can then mount the drive with:

 sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi 

When you’re done, you can easily copy the files to a USB drive and, after safely extracting them, copy them to your host computer. To manually disable usage:

 sudo umount /media/usb 

4. Send and receive data from SCP

It’s a little tricky to get started, the idea being that you can use the command line to send and receive data between your Raspberry Pi and your PC.

Team scp (Secure Copy Protocol) makes this possible. To use it, you first need to establish an SSH connection to your Raspberry Pi. . This works best on Linux as Windows users will need to install an SSH client for it to work. After connecting in Linux, type:

 scp pi@192.168.0.15:file.txt 

This uses the command scp identifies the default device and username, and specifies the filename. Document file.txt will be migrated from Pi in your computer’s home directory.

To copy the file file.txt to your Pi use:

 scp file.txt pi@192.168.0.15: 

(This: at the end is very important!)

Again, the home directory is the destination. To change this, specify a different directory, for example:

 scp file.txt pi@192.168.0.15:subdirectory/ 

This method is similar to the ADB push command used to send data to and from an Android device. when flashing a new ROM or rooting.

5. Best Option: SFTP

If you have a good FTP client that supports secure SFTP then this is probably the best option for getting data from your Raspberry Pi. For this, the flexible open source project FileZilla is used. is a good place to start. You can download a copy from filezilla-project.org.

SFTP stands for SSH File Transfer Protocol, so as long as SSH is enabled on your Raspberry Pi (usually through the raspi-config screen), you can use SFTP to upload and extract files in the GUI.

After launching FileZilla, open » File» > «Site Manager» and press » New site» . From here enter IP address your Raspberry Pi in the field Host (or simply raspberrypi.local, if you have Bonjour services running).

5 ways to copy data from Raspberry Pi to PC muo diy raspberrypi sftp transfer options

Continue filling out the form by selecting SFTP — SSH File Transfer Protocol for protocol and Normal for the input type. Enter your current Raspbian username and password for username and password (default is pi and raspberry ). You might want to click » Rename», to give the connection a descriptive name — this is especially useful if you use FileZilla regularly.

5 ways to copy data from Raspberry Pi to PC muo diy raspberrypi

As long as the Pi is already booted, you can press connect, to start a connection. In FileZilla, the local device (your computer) is on the left, and the remote computer (your Raspberry Pi) is on the right. You will need to browse the directories on both sides to find the source and target files. With that done, you can copy files from your Raspberry Pi by dragging them to the left pane, or by right-clicking and selecting » Download» .

(To copy files to the Pi, simply move them from left to right.)

While the setup is a little tricky, we think SFTP is the best solution for transferring files to and from the Raspberry Pi. For small files like MP3s and images, you can also use the boot partition to copy the data.

And if you are interested in using Raspberry Pi as a desktop PC look what we learned from this.

Похожие записи