gauxonz
Posts: 4
Joined: Tue Mar 12, 2013 9:37 pm

[SOLVED] Problems about remote back up

Tue Mar 12, 2013 9:53 pm

Hey guys i want to do a remote SD card bark up through ssh to my computer. I took the suggestion from
http://raspberrypi.stackexchange.com/qu ... spberry-pi,
and did

Code: Select all

ssh [email protected] dd if=/dev/mmcblk0 | gzip -c > img.gz
However after i did this I can't login to RPi. When I rebooted, I found the following message:
Image

But fortunately the system works well when i recover the whole system form the backup img i just maed.
So can anyone tell me why this happend and how to solve this?
Last edited by gauxonz on Wed Mar 13, 2013 4:02 pm, edited 1 time in total.

lleb
Posts: 8
Joined: Fri Aug 31, 2012 12:51 pm

Re: Problems about remote back up

Wed Mar 13, 2013 12:48 am

what does that error say, sorry nothing happens when i click the image and its far to small for my eyes to read.

you may wish to perform the DD local on the RPi and then scp or rsync the *.img over to your computer, or better yet remove the SD card from the RPi and perform the DD on either a Mac or a Linux box. Then everything is local and should not be an issue.

gauxonz
Posts: 4
Joined: Tue Mar 12, 2013 9:37 pm

Re: Problems about remote back up

Wed Mar 13, 2013 12:59 am

lleb wrote:what does that error say, sorry nothing happens when i click the image and its far to small for my eyes to read.

you may wish to perform the DD local on the RPi and then scp or rsync the *.img over to your computer, or better yet remove the SD card from the RPi and perform the DD on either a Mac or a Linux box. Then everything is local and should not be an issue.
sorry about the picture, and here i changed the address:
Image
Yeah but what im tying to do is to do it remotely (I don't want to shut down the PRi and plug in and out the SD card every time back up :) ). And why i didn't do DD local on the RPi and then scp or rsync the *.img over to my computer is that my RPi doesn't have enough space to do the DD locally :( . That what i'm going to solve...

gauxonz
Posts: 4
Joined: Tue Mar 12, 2013 9:37 pm

Re: Problems about remote back up

Wed Mar 13, 2013 1:00 am

gauxonz wrote:
lleb wrote:what does that error say, sorry nothing happens when i click the image and its far to small for my eyes to read.

you may wish to perform the DD local on the RPi and then scp or rsync the *.img over to your computer, or better yet remove the SD card from the RPi and perform the DD on either a Mac or a Linux box. Then everything is local and should not be an issue.
sorry about the picture, and here i changed the address:
Image
Yeah but what im tying to do is to do it remotely (I don't want to shut down the PRi and plug in and out the SD card every time back up :) ). And why i didn't do DD local on the RPi and then scp or rsync the *.img over to my computer is that my RPi doesn't have enough space to do the DD locally :( . That what i'm going to solve...
Oh and for the picture, you can right click it and select "open in the new tab", it will be bigger :)

Schorschi
Posts: 220
Joined: Thu Nov 22, 2012 9:38 pm

Re: Problems about remote back up

Wed Mar 13, 2013 3:22 am

Given this is Linux, dd has some issues with a live file system, that is issue 1, issue 2 is that dd is only accurate (usually) on a cold file system when attempting an image style backup, which means you have to take the root file system offline to ensure a consistent state of capture with dd, replicate to a different file system/disk from the backup source. I don't know of anything in the ARM implementation of Linux the Pi uses that addresses either issue as noted. I backup (most) of the live file system of an active/live Pi via rsync, to a Windows system share using cwrsync in fact, but rsync with the proper exclusions is a selective backup... so the restore is a bit of trick. You install a clean copy of the Linux OS, and then use the rsync backup as a poorman repo to do a selective replace/restore of files that may have changed over time from a clean install, as a point in time restore that overwrites the clean install files as noted, this works well for say capturing DHCP, BIND, TFTP and other services configuration files, say in the /etc/sysconfig directory (since I like to test Fedora on Pi, sick, I know!). Using rsync is not perfect, or transparent, nor a image-based backup like most of the SD card backup solutions are, but it does let you capture most incremental changes of a live Pi without powering down the Pi and pulling the SD card every single time you want to backup a Pi.

gauxonz
Posts: 4
Joined: Tue Mar 12, 2013 9:37 pm

Re: Problems about remote back up

Wed Mar 13, 2013 4:01 pm

Schorschi wrote:Given this is Linux, dd has some issues with a live file system, that is issue 1, issue 2 is that dd is only accurate (usually) on a cold file system when attempting an image style backup, which means you have to take the root file system offline to ensure a consistent state of capture with dd, replicate to a different file system/disk from the backup source. I don't know of anything in the ARM implementation of Linux the Pi uses that addresses either issue as noted. I backup (most) of the live file system of an active/live Pi via rsync, to a Windows system share using cwrsync in fact, but rsync with the proper exclusions is a selective backup... so the restore is a bit of trick. You install a clean copy of the Linux OS, and then use the rsync backup as a poorman repo to do a selective replace/restore of files that may have changed over time from a clean install, as a point in time restore that overwrites the clean install files as noted, this works well for say capturing DHCP, BIND, TFTP and other services configuration files, say in the /etc/sysconfig directory (since I like to test Fedora on Pi, sick, I know!). Using rsync is not perfect, or transparent, nor a image-based backup like most of the SD card backup solutions are, but it does let you capture most incremental changes of a live Pi without powering down the Pi and pulling the SD card every single time you want to backup a Pi.
This really helps, guess i need to learn more about Linux. Thanks a lot dude

Return to “General discussion”