Need help backing up Raspberry Pi
-
Exactly the kind of tool I'd use (although CCC on the Mac basically means you don't have to) but figured the lack of user friendliness would be a down point here
C
-
In Win32DiskImager there is a option for "read only allocated partitions". It is shown in the instruction linked from this thread.
The same instruction also describes how to use Gparted in Linux to resize the .img if so required. -
Don't forget that you're not looking at discs here. You're looking at partitions and mount points.
What I am seeing is you've got a full 64G SD allocated and mounted to various points in your file system. Most of it is in /root and most of it is unused.As to why you ended up with a 27G backup, I have no idea other than Windows is probably not terribly happy reading Linux file systems and partition info. It was never terribly well supported.
I don't really know many Windows tools these days, being a dyed in the wool BSD / Linux guy.
If you only have Windows, I used to use Acronis (many years back). The other thing you could do is use a live Linux CD and use one of the tools there. Even the terribly basic dd would be able to do it.
I would expect though that a properly functioning tool would create a 7Gish backup file. So yes, something is amiss. Can't tell if that means your backup is non-functional or not, though.
Have you got another SD card? Restore to that, shut the pi down and try and boot from the newly restored card if you need to test.
C
C
@catmanv2 said in Need help backing up Raspberry Pi:
Have you got another SD card? Restore to that
No I haven't. Not the same size anyway.
I think I will buy another SanDisk 64GB SD card and make sure I can actually restore to a new card etc.
-
@catmanv2 said in Need help backing up Raspberry Pi:
Have you got another SD card? Restore to that
No I haven't. Not the same size anyway.
I think I will buy another SanDisk 64GB SD card and make sure I can actually restore to a new card etc.
@cw-kid said in Need help backing up Raspberry Pi:
@catmanv2 said in Need help backing up Raspberry Pi:
Have you got another SD card? Restore to that
No I haven't. Not the same size anyway.
I think I will buy another SanDisk 64GB SD card and make sure I can actually restore to a new card etc.
That's a sensible approach anyway.
As for the 'Read only allocated partitions' it seems that Windows struggles to see the Pi partition (other than /boot) as allocated....C
-
If you'd run
dd
on an Ubuntu laptop for images, you might consider installing and runningpartclone
instead. It's the workhouse underlying Clonezilla, and it will produce smaller backup images (it only copies used space; dd copies, all blocks used or not).To make an image of a disk (
/dev/sda2
in this example):partclone -c -o /path/to/image-output -s /dev/sda2
And to restore that image later (same target device):
partclone -r -s /path/to/image-input -O /dev/sda2
Since the images can get very large (and may even grow larger than the filesystem allows), you can compress and split the image like this:
partclone -c -s /dev/sda2 -o - | gzip -c | | split -a 2 -b 2G - /path/to/imagefile.gz.
This will compress the output and split it into 2GB files, each having a '.gz.xx' ending, where xx is a two-letter code that keeps the parts sorted. To restore it:
cat /path/to/imagefile.gz.* | gunzip -c | partclone -r -s - -O /dev/sda2
-
@black-cat said in Need help backing up Raspberry Pi:
A simple to use "cloner" is Balena Etcher - it's gotten me out of trouble many times.
Mac only, though, isn't it?
C
-
@black-cat said in Need help backing up Raspberry Pi:
No, I use Windows.
Every day's a school day!
C