25
votes
How to clone Raspberry Pi SD Card on Windows, Linux, and macOS?
On Linux or OSX I use dd to make a backup from SD card. Reverse if and of (i.e. to where they point - source and destination) afterwards to restore, but be careful not to restore to a wrong disk. It ...
18
votes
Accepted
Can I backup my SD card with Disk Utility on OSX?
Unix dd
I'm boring and use the ancient dd command in OS X.
Plug your sdcard into your Mac
Open Disk Utility
Select your sdcard and take note of its Device name
(Mine is usually /dev/disk2)
Open ...
14
votes
Accepted
How to shrink an image file after allocating full space
So the best way I have found is to use GParted (you can either use a Linux-based OS, or boot from a GParted Live USB). It is simple enough to find detailed instructions on how to do each of these ...
13
votes
Accepted
"No such file or directory" while backing up the SD card using dd on Mac
If you are using sudo i.e. running with root permission you DO NOT have ~ as shortcut for your home directory.
Use FULL PATHS or cd to the target directory.
13
votes
Accepted
How to clone Raspberry Pi SD Card on Windows, Linux, and macOS?
I recently had to make a backup image for my Raspberry Pi 3 Model B and found an incredibly helpful guide from Beebom.
The guide outlines the process for cloning and restoring a Pi SD image for all ...
12
votes
Accepted
Backup Raspberry Pi automatically, with incremental backups
Rsnapshot fulfills those criteria:1
Can be used locally or remotely.
Can be automated/scheduled.
Uses numbered incremental backups.
I don't have much personal experience with it beyond the fact that ...
12
votes
Accepted
Easy backups and snapshots of a running system with LVM
You can move the installation of the Raspberry Pi OS to a LVM volume.
But what does it help me?
You can take snapshots from your running system.
You can install software and if you don't like it you ...
11
votes
How to shrink an image file after allocating full space
The exists a nice tool called pishrink which reduces the size of a dd image as much as possible by shrinking the root partition. If you start up the restored image the first time the partition is ...
9
votes
Self healing SD Card partitions
If you have problems with SD-cards you should try (in order):
Use another (bigger) power supply.
Connect a powered hub in between the Raspberry and any USB peripheral you may have.
Use SD-cards ...
9
votes
Accepted
Clone Raspberry Pi SDCard to file on Mac OS X?
I use the following script to backup SD cards on OS X:-
#!/bin/bash
# script to backup Pi SD card
# 2017-06-05
# 2018-11-29 optional name
# DSK='disk4' # manual set disk
OUTDIR=~/temp/Pi
# Find ...
9
votes
Accepted
Restore PI from Pi itself
Not quite. You would overwrite the partition tables when you re-image it and replace said tables with the ones from the image. After your imaging program is done, it would release the file handle to ...
7
votes
Can a Raspberry Pi be used to create a backup of itself?
It's now 2022; the original question here, and some of the answers, are about 9 years old now. I'm adding this answer to provide an update, and to connect this question, and its answers, with a more ...
6
votes
Accepted
Copy multiple partitions to one .img file
There is no magic in the image file. It's simply a bit-for-bit copy of a chunk of the sd card. What you want to do is figure out exactly where the second partition ends, and copy from the device file ...
6
votes
Create a Raspberry pi backup without dd
There are at least two options to create bootable mSD clones, depending on whether you prefer a UI or the terminal:
pi clone which gets installed alongside with the Pixel desktop.
the rpi-clone ...
6
votes
How to backup a Raspberry Pi over SSH?
You will (sooner or later) run into problems with the approach you're taking. Running dd to back up a running system (or even a mounted drive) is rolling the dice. It's been said of one who follows ...
5
votes
Backing up SD card generates a huge .img file
Surprise! creating an image of a 16GiB SD Card creates a 16GiB image.
There are 2 options;
only backup files can-a-raspberry-pi-be-used-to-create-a-backup-of-itself
or compress the image https://...
5
votes
Is there a way to compress a backup of the RPi because the backup has empty space?
https://www.raspberrypi.org/documentation/linux/filesystem/backup.md explains backup and restoration.
You don't indicate what OS you are using but it is simple on any 'NIX system.
I use the following ...
5
votes
Is there a way to compress a backup of the RPi because the backup has empty space?
Already answered here dd-on-entire-disk-but-do-not-want-empty-portion
Assuming you want to save /dev/sdXN to /tgtfs/image.raw and you are root:
mkdir /srcfs && mount /dev/sdXN /srcfs
Use ...
5
votes
Backing up entire Raspberry Pi's state
Best option is a complete clone of your SDCard as a bootable backup.
There's a tool in Raspbian to do that, all you need is a USB reader and a second SDCard that's the same size or bigger than your ...
4
votes
Can I perform a total backup of my system on an image file?
I faced a similar issue and therefore wrote a tool just for my private use. I decided to call it raspiBackup and made it open source when I thought it may be valuable for the community also. It took ...
4
votes
Backup Raspberry Pi automatically, with incremental backups
If you consider these 2 facts it will open you up to other options:
You can mount the same device in multiple directories simultaneously.
You can create tmpfs mounts anywhere you want to mask a ...
4
votes
Can I backup my SD card with Disk Utility on OSX?
If you are using OS X with the dd command, use /dev/rdiskX instead of /dev/diskX and also bs=16m instead of bs=1m it should speed things up a lot.
4
votes
Clone Raspberry Pi SDCard to file on Mac OS X?
You can use dd to backup the drive. The trick is to use the device as the input, not its partitions. Taking an example from the RPi forum, you can backup and even auto compress the information in one ...
4
votes
Restore PI from Pi itself
With a big enough SD card, you could have 2 usable boot options - and manipulate the one not in use, which is fine, then update grub & reboot to the new OS.
You can't write to the currently ...
4
votes
Accepted
How to setup a simple No-brainer 'TimeMachine' like backups for Raspbian
I use rsnapshot for incremental backups. It's extremely lightweight and can be controlled via the conf file and run using cron on a user controlled basis.
Here is a "How-to" post for the pi.
As far ...
4
votes
Why can't Pi 4B read a copied back-up micro-sd card in a usb card reader?
I don't think the Pi model is a factor here.
When you made your backup, did you select New partition UUIDs?
If not, that's likely the problem.
SD Card Copier help says this:
Under Raspbian ...
4
votes
Periodic backup of Rpi3 Stretch SD card
There are many questions on this site asking how to backup a Raspberry Pi.
The most important thing is to actually perform backups, and the faster and easier the process the better.
I have used the ...
4
votes
Accepted
copy sd card through terminal
You can use dd, this applies also for creating an image of an SDD, USB, ... and restoring it
It's best to unmount the drive you're going to copy. In case of the SD-card, remove the SD-card from the ...
4
votes
Accepted
Are backups using dd if=/dev/mmcblk0 safe and consistent?
Pi documentation, repeated many times by others, seems to state that this dd approach is not only acceptable but indeed recommended.
This is because many of the people who got in earlier with the Pi ...
4
votes
Are backups using dd if=/dev/mmcblk0 safe and consistent?
Your "conventional wisdom" is right. The fact that someone managed to copy an image from a mounted device and it worked doesn't mean it will work every single time. Actually, it doesn't even ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
backup × 183raspbian × 56
sd-card × 47
image × 33
boot × 10
linux × 10
partition × 9
ssh × 8
pi-3 × 7
raspbian-stretch × 7
restore × 7
rsync × 7
networking × 6
pi-2 × 6
usb × 6
raspbian-jessie × 6
boot-issues × 6
hard-drive × 6
win32diskimager × 5
raspbian-buster × 4
storage × 4
macos × 4
pi-4 × 3
ubuntu × 3
windows × 3