eggsbachs
Posts: 3
Joined: Mon May 09, 2016 1:33 am

Backup Raspbian SD image without mounted drives

Mon May 09, 2016 1:45 am

I'm looking to create a complete backup of my raspbian image in it's current state. I've spent quite a bit of time configuring applications, permissions, drives and users and want to save time in the future. However I'm looking to omit any mounted HDD's I have.

I've done some searching and can't find much reference to mounted drives. I've initially followed the official guide here, but the image was pushing 48GB and still going even though my SD card is 8GB.

Current setup:
8GB SD card with raspbian boot
2TB HDD - media library
500GB SSD - extra storage
500GB - backup drive

My drives are automounted via the fstab in the /media/Drives/directory., I've of course added the "Drives" directory.

I'm thinking that I could manually rsync certain directories over then create an image afterwards? If that's even possible, I'm not sure what drives I should sync over? Everything but the /media/Drives? If it's any help, I've installed raspbian via NOOBS.

That's the only route I can think of right now. Possibly wrap it up in a script and stick it in a cron.

Any help would be greatly appreciated - thanks!

DirkS
Posts: 10347
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Backup Raspbian SD image without mounted drives

Mon May 09, 2016 10:51 am

You can use rsync with the -x option (see e.g. http://linux.die.net/man/1/rsync)
This will not backup any mounted devices.

NB: The FAT (boot) parttion is mounted as /boot so this will also be skipped. If you want to back this up you will have to do that separately.

eggsbachs
Posts: 3
Joined: Mon May 09, 2016 1:33 am

Re: Backup Raspbian SD image without mounted drives

Mon May 09, 2016 1:37 pm

Thanks for the heads up.
DirkS wrote:NB: The FAT (boot) parttion is mounted as /boot so this will also be skipped. If you want to back this up you will have to do that separately.
In order to properly have a raspbian.img, should I run a second rsync to back up this dir then perform my image creation from the two rysncs?. I imagine this would then create a fully bootable/restorable image.

Thanks again.

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: Backup Raspbian SD image without mounted drives

Mon May 09, 2016 2:40 pm

I'm looking to create a complete backup of my raspbian image in it's current state. I've spent quite a bit of time configuring applications, permissions, drives and users and want to save time in the future.
I have done some heavy customizations to my Jessie OS also. I backup the 32GB sdcard raspbian image regularly. takes like 20 min or so.

I use Diskimager on windows (insert sdcard into reader, run diskimager as admin, and "read' a backup image to the directory i select. When I need to restore the backup, i simply "write' it back to the sdcard.

Diskimager: https://sourceforge.net/projects/win32diskimager/

Pi3 Jessie:
Image
DNPNWO

eggsbachs
Posts: 3
Joined: Mon May 09, 2016 1:33 am

Re: Backup Raspbian SD image without mounted drives

Mon May 09, 2016 8:21 pm

Thanks Rive,

I'm going to use this method as my plan B process, though I should at least do it once right now :shock: .

Ideally I want this Pi untouched and constantly running as it's my NAS & Media server. The next step is to hack crashplan onto it so I can also back up to the cloud as well. Bummer Backblaze doesn't offer true personal backup support. I was running it on my old MacBookPro before it bit the dust.

Return to “Beginners”