Is it possible to run the dd command via ssh to backup/image the whole sd card to an attached external usb drive ?
Something like dd if=/dev/sdcard of=/media/lacie rpi.img
-
- Posts: 33
- Joined: Sat Jan 12, 2013 5:14 pm
- pluggy
- Posts: 3635
- Joined: Thu May 31, 2012 3:52 pm
- Location: Barnoldswick, Lancashire,UK
- Contact: Website
Re: dd command help
No. In another machine, no problem, but the Pi itself would have OS files open and locked and deny access to parts of the SD card.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
Re: dd command help
Yes, but it's really not recommended.
If you do, then you should make sure as few OS files are in use as possible. Stop all the services you can - like GUI/Webserver etc.
You will end up with a damaged image of the filesystem. How bad that is will depend on how long it took and what was updated during that time. The filesystem checks on startup will normally cope with that, but not always.
A better idea would be to load up a second SD card, boot your Pi from that, put your main card in a USB reader then use your Pi to copy its contents to your USB disk.
Also, file locks at the filesystem level won't deny access as dd uses low level reads of the card's contents and doesn't bother about such things.
If you do, then you should make sure as few OS files are in use as possible. Stop all the services you can - like GUI/Webserver etc.
You will end up with a damaged image of the filesystem. How bad that is will depend on how long it took and what was updated during that time. The filesystem checks on startup will normally cope with that, but not always.
A better idea would be to load up a second SD card, boot your Pi from that, put your main card in a USB reader then use your Pi to copy its contents to your USB disk.
Also, file locks at the filesystem level won't deny access as dd uses low level reads of the card's contents and doesn't bother about such things.