Backing up your home folder
It's likely that all your important files are in a directory on your SD card called
/home/pi. This resource assumes this is where you have been keeping your files. If they are elsewhere on your SD card, then you might have to copy them into
Backing up using removable storage
If you have a USB flash drive or a portable hard drive with enough storage, then this is the easiest method to back up your files.
Insert your USB drive into one of your Pi's USB ports; it should be recognised straight away.
Open the USB drive in File Manager.
Use File Manager to open a second window and position it alongside the first window.
- You can now copy the contents of
/home/pionto the USB drive by dragging them across.
If you can't copy the files over, it probably means you're using a USB drive that has been formatted to be used with Mac OS X. Try formatting the USB drive with a FAT32 file system, using your Mac's Disk Utility.
Backing up over a network
You're going to need your Raspberry Pi's IP address to copy files over a network.
Boot up your Raspberry Pi, ensure it's connected to the network, and then open a terminal window.
In the terminal, type:
- The Raspberry Pi's IP address will be displayed.
Linux and Mac instructions
On your Linux computer or Mac, ensure you're connected to the same network as the Raspberry Pi, then open a terminal window.
Now type the following into the terminal, replacing
192.168.1.111with the IP address you have taken from the Raspberry Pi:
rsync -av --exclude".*/" email@example.com:/home/pi/ ~/RPi-backup
- If you now look in your Mac or Linux machine's home directory, you should see a folder called
RPi-backup, containing all your files.
Ensure your Windows machine is connected to the same network as the Raspberry Pi.
To copy files over the network to a Windows machine, you'll need to install a program called WinSCP.
Go to the WinSCP download page.
Download the portable executable:
If you check in your Downloads folder, you should see the following files. Double-click on the WinSCP application (not the MS-DOS application):
Double-click the file and then click on Run if you are asked:
On the next screen, fill in the IP address of the Pi, and the username and password:
A warning will pop up, asking whether you trust the computer or not. Click on Yes:
The next screen will allow you to transfer files between the machines by dragging and dropping from one pane to another:
Backing up by accessing the SD card on Linux
If you're using a Linux machine, then you can copy the files directly from the SD card.
Shut down the Raspberry Pi, remove the micro SD card, and place it into an SD card adapter. Then insert this into your machine.
The screenshot below shows the SD card mounted on a machine running Ubuntu:
Your files will be in
home/pi, so double-click on the
homedirectory and copy the entire
pidirectory to your local machine: