Reputation: 3364
Raspberry pi easily suffer the sudden cutoff of power supply, which may lead to a system corruption or data losing. So, it is important to find some methods for the purpose of system backup.
I wish there exist some tools or scripts which can packet the entire filesystem on TF card into an image. Then, when the system crashes and can't be repaired. I could restore it from these images. I feel that the images just act as snapshoots.
Upvotes: 1
Views: 456
Reputation: 56
You can use dd
command to save sdcard to a file when the sdcard is not in use.
sample usage is
dd if=/dev/sdX of=/your/destination/image/file bs=8M
the bs parameter means block size, since the default block size just 512 bytes, the size is so small that reading/writing speed are slow.
and the image file can be compressed by gzip/bzip2/xz/... etc, i suggest use man
command to get the details of command.
Upvotes: 3