26
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 ...
14
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
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
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
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
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 ...
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
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 ...
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
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
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
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 ...
3
votes
Backup Raspberry Pi automatically, with incremental backups
I had the same issue with my Raspis @ home. That's why I wrote raspiBackup which allows to create dd, tar and rsync backups on a regular base without user invention. Just give it a try.
3
votes
Backing up SD card generates a huge .img file
It's worse than you think == chances are your '16Gb' .img WONT WRITE BACK to another '16Gb' SD card !
1) The stupid Pi system autoexpands to every last block of the SD card on FIRST BOOT !! This is ...
3
votes
How to shrink the size of your sd card before using dd to backup your sd card
Working with Raspberry Pi SD cards is painful on Windows.
I suggest using a gparted Live CD (based on Linux) to modify RPi partitions. You can boot from such a disk without touching your Windows ...
3
votes
Accepted
Create a Raspberry pi backup without dd
I was not satisfied with any of the previous answer, but I have now found a way that gives me entire satisfaction, using Clonezilla :
On another computer running Linux (in my case Ubuntu 18.04),
I ...
3
votes
Restoring backup of /etc on new disk image and best practices
I doubt that this question can be definitively answered. Here is my opinion.
The /etc directory is used for configuration data. The files and their contents are likely to change on a release by ...
3
votes
Restore backup failed (using rsync)
I specifically reactivated my never used account to answer this question, because I was having the same problems last week and felt like other people will too./rant
About the actual problem, using ...
3
votes
Backup RPI to a Linux Machine via ssh
There is an inherent problem with your live backup approach: you need the entire file system to remain stable during the backup process, otherwise there is no way to guarantee that the backup will ...
3
votes
Accepted
Cloning the Raspberry Pi SD Card as a balenaEtcher-ready instal-able image
See https://raspberrypi.stackexchange.com/a/72047/8697 which lists the script I use to backup my Pi on the Mac. This includes checks to prevent accidentally overwriting the wrong thing (I learnt the ...
3
votes
can I backup pi3 to a image file remotely to macbook?
You can do a disk backup on a running system by reading /dev/sda, or whatever the name of your disk is.
However, a disk backup will not necessarily be consistent, and it will occupy space for blocks ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
backup × 185raspbian × 56
sd-card × 46
image × 33
boot × 10
linux × 10
ssh × 8
partition × 8
pi-3 × 7
raspbian-stretch × 7
restore × 7
rsync × 7
networking × 6
usb × 6
pi-2 × 6
raspbian-jessie × 6
boot-issues × 6
hard-drive × 6
storage × 5
win32diskimager × 5
raspbian-buster × 4
raspberry-pi-os × 4
macos × 4
pi-4 × 3
ubuntu × 3