Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.raspberry-pi > #10320 > unrolled thread
| Started by | Russell Gadd <russ.mail.lists@gmail.com> |
|---|---|
| First post | 2016-01-07 20:09 +0000 |
| Last post | 2016-01-17 15:44 +0000 |
| Articles | 20 on this page of 54 — 16 participants |
Back to article view | Back to comp.sys.raspberry-pi
Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-07 20:09 +0000
Re: Failure to clone SD card with compression Roger Bell_West <roger+csrp201601@nospam.firedrake.org> - 2016-01-08 00:05 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-08 00:49 +0000
Re: Failure to clone SD card with compression Adam Funk <a24061@ducksburg.com> - 2016-01-08 11:17 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-08 12:58 +0000
Re: Failure to clone SD card with compression Adam Funk <a24061@ducksburg.com> - 2016-01-11 14:14 +0000
Re: Failure to clone SD card with compression ray carter <ray@zianet.com> - 2016-01-08 17:19 +0000
Re: Failure to clone SD card with compression Rob Morley <nospam@ntlworld.com> - 2016-01-08 17:30 +0000
Re: Failure to clone SD card with compression ray carter <ray@zianet.com> - 2016-01-08 01:31 +0000
Re: Failure to clone SD card with compression "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-01-08 03:00 +0100
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-09 10:17 +0000
Re: Failure to clone SD card with compression Dom <domafp@blueyonder.co.uk> - 2016-01-09 11:31 +0000
Re: Failure to clone SD card with compression "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-01-09 14:02 +0100
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-09 12:07 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-09 20:10 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-09 20:34 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-10 18:52 +0000
Re: Failure to clone SD card with compression Dom <domafp@blueyonder.co.uk> - 2016-01-10 21:25 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-09 20:09 +0000
Re: Failure to clone SD card with compression Dom <domafp@blueyonder.co.uk> - 2016-01-09 20:27 +0000
Re: Failure to clone SD card with compression CPMDude <nospam@somewhere.net> - 2016-01-10 01:40 -0800
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-10 15:37 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-10 15:41 +0000
Re: Failure to clone SD card with compression CPMDude <nospam@somewhere.net> - 2016-01-10 09:18 -0800
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-10 18:51 +0000
Re: Failure to clone SD card with compression Anssi Saari <as@sci.fi> - 2016-01-12 11:46 +0200
Re: Failure to clone SD card with compression Rob <nomail@example.com> - 2016-01-13 12:18 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-13 13:31 +0000
Re: Failure to clone SD card with compression CPMDude <nospam@somewhere.net> - 2016-01-13 11:19 -0800
Re: Failure to clone SD card with compression Rob <nomail@example.com> - 2016-01-13 19:33 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-13 20:55 +0000
Re: Failure to clone SD card with compression CPMDude <nospam@somewhere.net> - 2016-01-13 21:48 -0800
Re: Failure to clone SD card with compression CPMDude <nospam@somewhere.net> - 2016-01-13 21:58 -0800
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-14 06:44 +0000
Re: Failure to clone SD card with compression Rob <nomail@example.com> - 2016-01-14 09:24 +0000
Re: Failure to clone SD card with compression Rob <nomail@example.com> - 2016-01-14 09:40 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-14 10:35 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-14 21:58 +0000
Re: Failure to clone SD card with compression Martin Gregorie <martin@address-in-sig.invalid> - 2016-01-15 00:29 +0000
Re: Failure to clone SD card with compression fruit <fruit@invalid.org.uk> - 2016-01-15 06:25 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-15 07:46 +0000
Re: Failure to clone SD card with compression Rob Morley <nospam@ntlworld.com> - 2016-01-15 08:34 +0000
Re: Failure to clone SD card with compression Rob <nomail@example.com> - 2016-01-15 09:47 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-15 16:53 +0000
Re: Failure to clone SD card with compression CPMDude <nospam@somewhere.net> - 2016-01-16 01:03 -0800
Re: Failure to clone SD card with compression Rob <nomail@example.com> - 2016-01-16 10:00 +0000
Re: Failure to clone SD card with compression Russell Gadd <russ.mail.lists@gmail.com> - 2016-01-16 20:10 +0000
Re: Failure to clone SD card with compression druck <news@druck.org.uk> - 2016-01-17 11:52 +0000
Re: Failure to clone SD card with compression Ahem A Rivet's Shot <steveo@eircom.net> - 2016-01-17 12:16 +0000
Re: Failure to clone SD card with compression Martin Gregorie <martin@address-in-sig.invalid> - 2016-01-17 13:49 +0000
Re: Failure to clone SD card with compression The Natural Philosopher <tnp@invalid.invalid> - 2016-01-17 14:22 +0000
Re: Failure to clone SD card with compression Alan Adams <alan@adamshome.org.uk> - 2016-01-17 15:00 +0000
Re: Failure to clone SD card with compression Martin Gregorie <martin@address-in-sig.invalid> - 2016-01-17 16:00 +0000
Re: Failure to clone SD card with compression Ahem A Rivet's Shot <steveo@eircom.net> - 2016-01-17 15:44 +0000
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | CPMDude <nospam@somewhere.net> |
|---|---|
| Date | 2016-01-10 01:40 -0800 |
| Message-ID | <n6t8u4$cb1$1@gioia.aioe.org> |
| In reply to | #10338 |
On 1/9/2016 12:27 PM, Dom wrote: > On 09/01/16 20:09, Russell Gadd wrote: >> >> # dd bs=1M count=3752 iflag=fullblock if=/dev/sdc | gzip >> >/backfile.img.gz >> >> To restore the SD card: >> # gunzip -c /backfile.img.gz | dd bs=1M iflag=fullblock of=/dev/sdc >> > > I don't know exactly what the iflag=fullblock does. Does it improve > performance? iflag=fullblock does absolutely nothing unless you specify a value for ibs. If ibs is specified (not bs=, but ibs=), then dd will do multiple reads up to the value of ibs before continuing. This (usually) means that dd will spawn multiple processes, which can cause other issues when used in a pipe...
[toc] | [prev] | [next] | [standalone]
| From | Russell Gadd <russ.mail.lists@gmail.com> |
|---|---|
| Date | 2016-01-10 15:37 +0000 |
| Message-ID | <n6ttml$1t1$1@dont-email.me> |
| In reply to | #10342 |
On 10/01/16 09:40, CPMDude wrote:
> ...
>>
>> I don't know exactly what the iflag=fullblock does. Does it improve
>> performance?
>
> iflag=fullblock does absolutely nothing unless you specify a value for
> ibs. If ibs is specified (not bs=, but ibs=), then dd will do multiple
> reads up to the value of ibs before continuing. This (usually) means
> that dd will spawn multiple processes, which can cause other issues when
> used in a pipe...
It is vital in this case. See this from "info dd":
Note if the input may return short reads as could be the
case when reading from a pipe for example, `iflag=fullblock' will
ensure that `count=' corresponds to complete input blocks rather
than the traditional POSIX specified behavior of counting input
read operations.
Also see my previous post in this thread about "conv=sync".
[toc] | [prev] | [next] | [standalone]
| From | Russell Gadd <russ.mail.lists@gmail.com> |
|---|---|
| Date | 2016-01-10 15:41 +0000 |
| Message-ID | <n6ttuf$34j$1@dont-email.me> |
| In reply to | #10342 |
On 10/01/16 09:40, CPMDude wrote: > ... (not bs=, but ibs=), then > ... No. bs also affected: "bs=" overrides any ibs= and obs= settings
[toc] | [prev] | [next] | [standalone]
| From | CPMDude <nospam@somewhere.net> |
|---|---|
| Date | 2016-01-10 09:18 -0800 |
| Message-ID | <n6u3pu$1h7$1@gioia.aioe.org> |
| In reply to | #10345 |
On 1/10/2016 7:41 AM, Russell Gadd wrote: > On 10/01/16 09:40, CPMDude wrote: >> ... (not bs=, but ibs=), then >> ... > No. bs also affected: > "bs=" overrides any ibs= and obs= settings When in doubt, check the source code as I did. The internet is not a substitute for knowledge.
[toc] | [prev] | [next] | [standalone]
| From | Russell Gadd <russ.mail.lists@gmail.com> |
|---|---|
| Date | 2016-01-10 18:51 +0000 |
| Message-ID | <n6u92v$fng$1@dont-email.me> |
| In reply to | #10336 |
On 09/01/16 20:09, Russell Gadd wrote:
> Ok my writeup of the command lines is:
>
> To create a compressed image file:
> (make sure the count is correct or omit it for safety
> count can be found from fdisk
> use End block address of last partition +1,
> x 1024 for bytes, divide by your bs (here=1M))
>
> # dd bs=1M count=3752 iflag=fullblock if=/dev/sdc | gzip >/backfile.img.gz
>
> To restore the SD card:
> # gunzip -c /backfile.img.gz | dd bs=1M iflag=fullblock of=/dev/sdc
>
Oops - sorry, details of calculation of count was wrong. It should have
been 512 byte sectors rather than 1024 byte blocks:
How to calculate count:
count can be found from fdisk
use "End sector address of last partition" +1,
x 512 for bytes per sector, then
divide by your bs (here=1M))
Example which I used above:
# fdisk -l
...
Start End Blocks Id System
/dev/sdc1 8192 131071 61440 0c FAT32
/dev/sdc2 131072 7684095 3776512 83 Linux
So count = (7684095+1) x 512 / 1048576
=7684096 / 2048
=3752
[toc] | [prev] | [next] | [standalone]
| From | Anssi Saari <as@sci.fi> |
|---|---|
| Date | 2016-01-12 11:46 +0200 |
| Message-ID | <vg3a8o9brxq.fsf@coffee.modeemi.fi> |
| In reply to | #10320 |
Russell Gadd <russ.mail.lists@gmail.com> writes: > I am having difficulty using gzip for compressing images of SD > cards. Just an aside: if your backup images are important to you, you should never compress them, especially with gzip. A single bit error in a gz file makes it just so much junk bits. Or with the program gzip recovery you might get something resembling your original data but that might still be useless for a file system image. If you really have to, bzip2 uses blocks so you just lose the block with the error. Block oriented backup apps like fsarchiver and partimage do likewise and they usually have the smarts to just leave out parts of the filesystem that aren't in use so you get less data that way. So, instead of compression, I'd propose generating error correction data with par2 for your images.
[toc] | [prev] | [next] | [standalone]
| From | Rob <nomail@example.com> |
|---|---|
| Date | 2016-01-13 12:18 +0000 |
| Message-ID | <slrnn9cg4d.nea.nomail@xs9.xs4all.nl> |
| In reply to | #10357 |
Anssi Saari <as@sci.fi> wrote: > Russell Gadd <russ.mail.lists@gmail.com> writes: > >> I am having difficulty using gzip for compressing images of SD >> cards. > > Just an aside: if your backup images are important to you, you should > never compress them, especially with gzip. A single bit error in a gz > file makes it just so much junk bits. Or with the program gzip recovery > you might get something resembling your original data but that might > still be useless for a file system image. I prefer my filesystem images with zero bit errors anyway... so I put them on harddisks with ECC. And in fact I prefer a "completely junk bits" situation over a nasty single bit error that results in mysterious, unexplainable problems.
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2016-01-13 13:31 +0000 |
| Message-ID | <n75jjd$3fd$1@news.albasani.net> |
| In reply to | #10358 |
On 13/01/16 12:18, Rob wrote: > And in fact I prefer a "completely junk bits" situation over a nasty > single bit error that results in mysterious, unexplainable problems. Hah! yes. A few months after I had written spome code for a D(OS 2.0 based machine I was recalled to fix tow bugs. One was easy enough, but the other made no sense. The code appeared to take a jump that was completely impossible. I surmised the code was inexplicably corrupted in some way, but could not pin it down till I coped the code to a floppy and compared it on another machine. Two bytes were 0FFH.. After several days of head scratching and eliminating one thing after another we removed a video capture card from the PC..and Lo! the code was still corrupted on the hard drive, but not when reading it off the floppy, and copying the floppy to the hard drive copied uncorrupted code. Another day with the hardware boys reverse enginneering the circuit diagram of the card revealed the worst piece of bus decode design I have ever witlessness. What was happening is that the card, when a certain RAM address was used by DMA process from the floppy would still be ON the bus because the address decode was way too slow, when the IO select line went active, whereupon it would grab the data bus.. and stick all ones on it. As you say, if only it has simply made things collapse completely... ..then the people who designed it would not have3 refused to fix it on the grounds 'no one else had complained'... -- How fortunate for governments that the people they administer don't think. Adolf Hitler
[toc] | [prev] | [next] | [standalone]
| From | CPMDude <nospam@somewhere.net> |
|---|---|
| Date | 2016-01-13 11:19 -0800 |
| Message-ID | <n76803$1v5o$1@gioia.aioe.org> |
| In reply to | #10358 |
On 1/13/2016 4:18 AM, Rob wrote: > Anssi Saari <as@sci.fi> wrote: > > I prefer my filesystem images with zero bit errors anyway... so I > put them on harddisks with ECC. > > And in fact I prefer a "completely junk bits" situation over a nasty > single bit error that results in mysterious, unexplainable problems. > Your ECC hard disk does you no good when the file is corrupted DURING TRANSFER, which is the scenario under discussion. As the OP stated, there is little hope of recovery if the file is compressed. With an uncompressed (or block compressed) file, at least you can recover important data. Even with an ECC hard disk, RAID, or whatever scheme you choose, you can STILL EXPERIENCE BIT CORRUPTION! The ECC presumes that the data stream written to it was uncorrupted to begin with. That is far from a reasonable assumption - if you are copying files over a net connection (TCP delivery is NOT guaranteed), buffers can overflow/underflow, pipes can fail, any number of things can happen outside the control of the destination file system. Critical data should NEVER be compressed with an algorithm that cannot be reversed in the presence of bit corruption. Period.
[toc] | [prev] | [next] | [standalone]
| From | Rob <nomail@example.com> |
|---|---|
| Date | 2016-01-13 19:33 +0000 |
| Message-ID | <slrnn9d9k7.gpd.nomail@xs9.xs4all.nl> |
| In reply to | #10360 |
CPMDude <nospam@somewhere.net> wrote: > On 1/13/2016 4:18 AM, Rob wrote: >> Anssi Saari <as@sci.fi> wrote: >> >> I prefer my filesystem images with zero bit errors anyway... so I >> put them on harddisks with ECC. >> >> And in fact I prefer a "completely junk bits" situation over a nasty >> single bit error that results in mysterious, unexplainable problems. >> > > Your ECC hard disk does you no good when the file is corrupted DURING > TRANSFER, which is the scenario under discussion. As the OP stated, > there is little hope of recovery if the file is compressed. With an > uncompressed (or block compressed) file, at least you can recover > important data. Even with an ECC hard disk, RAID, or whatever scheme > you choose, you can STILL EXPERIENCE BIT CORRUPTION! The ECC presumes > that the data stream written to it was uncorrupted to begin with. That > is far from a reasonable assumption - if you are copying files over a > net connection (TCP delivery is NOT guaranteed), buffers can > overflow/underflow, pipes can fail, any number of things can happen > outside the control of the destination file system. Critical data > should NEVER be compressed with an algorithm that cannot be reversed in > the presence of bit corruption. Period. All of the above transfer methods have checking algorithms in place that guard against single-bit corruption. And again, I prefer a completely garbled image over a single bit corruption any time. Nothing worse than an error that isn't obvious. Currently I am using a computer without ECC memory, but after some experiences with memory errors in the past years I am pretty sure that the next one will have ECC RAM again. (previously I always made sure there was at least parity checking)
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2016-01-13 20:55 +0000 |
| Message-ID | <n76djr$n88$1@news.albasani.net> |
| In reply to | #10360 |
On 13/01/16 19:19, CPMDude wrote: > (TCP delivery is NOT guaranteed), Yes, it is. -- New Socialism consists essentially in being seen to have your heart in the right place whilst your head is in the clouds and your hand is in someone else's pocket.
[toc] | [prev] | [next] | [standalone]
| From | CPMDude <nospam@somewhere.net> |
|---|---|
| Date | 2016-01-13 21:48 -0800 |
| Message-ID | <n77cqp$1el5$1@gioia.aioe.org> |
| In reply to | #10362 |
On 1/13/2016 12:55 PM, The Natural Philosopher wrote: > On 13/01/16 19:19, CPMDude wrote: >> (TCP delivery is NOT guaranteed), > Yes, it is. > > No, it's not.
[toc] | [prev] | [next] | [standalone]
| From | CPMDude <nospam@somewhere.net> |
|---|---|
| Date | 2016-01-13 21:58 -0800 |
| Message-ID | <n77ded$1fgq$1@gioia.aioe.org> |
| In reply to | #10363 |
On 1/13/2016 9:48 PM, CPMDude wrote: > On 1/13/2016 12:55 PM, The Natural Philosopher wrote: >> On 13/01/16 19:19, CPMDude wrote: >>> (TCP delivery is NOT guaranteed), >> Yes, it is. >> >> > No, it's not. Pardon me, I accidentally sent that before I finished typing. The underlying IP layer which TCP sits on top of has no guaranteed delivery. But that's beside the point - a failure can happen at multiple endpoints and in multiple failure modes (missing data, single bit errors, bit reversals, double bit errors, etc.). The ECC of a hard disk plays no role in ensuring data integrity until AFTER the data has been written to disk. It cannot detect whether or not that data had been corrupted ENROUTE to the hard disk.
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2016-01-14 06:44 +0000 |
| Message-ID | <n77g3t$dcg$1@news.albasani.net> |
| In reply to | #10364 |
On 14/01/16 05:58, CPMDude wrote: > On 1/13/2016 9:48 PM, CPMDude wrote: >> On 1/13/2016 12:55 PM, The Natural Philosopher wrote: >>> On 13/01/16 19:19, CPMDude wrote: >>>> (TCP delivery is NOT guaranteed), >>> Yes, it is. >>> >>> >> No, it's not. > > Pardon me, I accidentally sent that before I finished typing. > > The underlying IP layer which TCP sits on top of has no guaranteed > delivery. But that's beside the point - a failure can happen at > multiple endpoints and in multiple failure modes (missing data, single > bit errors, bit reversals, double bit errors, etc.). The ECC of a hard > disk plays no role in ensuring data integrity until AFTER the data has > been written to disk. It cannot detect whether or not that data had > been corrupted ENROUTE to the hard disk. No, thats what the TCP stack is for. TCP is guaranteed to either be uncorrupted, or to fail completely -- You can get much farther with a kind word and a gun than you can with a kind word alone. Al Capone
[toc] | [prev] | [next] | [standalone]
| From | Rob <nomail@example.com> |
|---|---|
| Date | 2016-01-14 09:24 +0000 |
| Message-ID | <slrnn9eqb9.3fa.nomail@xs9.xs4all.nl> |
| In reply to | #10364 |
CPMDude <nospam@somewhere.net> wrote: > On 1/13/2016 9:48 PM, CPMDude wrote: >> On 1/13/2016 12:55 PM, The Natural Philosopher wrote: >>> On 13/01/16 19:19, CPMDude wrote: >>>> (TCP delivery is NOT guaranteed), >>> Yes, it is. >>> >>> >> No, it's not. > > Pardon me, I accidentally sent that before I finished typing. > > The underlying IP layer which TCP sits on top of has no guaranteed > delivery. But that's beside the point - a failure can happen at > multiple endpoints and in multiple failure modes (missing data, single > bit errors, bit reversals, double bit errors, etc.). The ECC of a hard > disk plays no role in ensuring data integrity until AFTER the data has > been written to disk. It cannot detect whether or not that data had > been corrupted ENROUTE to the hard disk. The TCP header has a checksum field that guards the data against single-bit errors that might occur in the IP layer.
[toc] | [prev] | [next] | [standalone]
| From | Rob <nomail@example.com> |
|---|---|
| Date | 2016-01-14 09:40 +0000 |
| Message-ID | <slrnn9er96.3fa.nomail@xs9.xs4all.nl> |
| In reply to | #10366 |
Rob <nomail@example.com> wrote: > CPMDude <nospam@somewhere.net> wrote: >> On 1/13/2016 9:48 PM, CPMDude wrote: >>> On 1/13/2016 12:55 PM, The Natural Philosopher wrote: >>>> On 13/01/16 19:19, CPMDude wrote: >>>>> (TCP delivery is NOT guaranteed), >>>> Yes, it is. >>>> >>>> >>> No, it's not. >> >> Pardon me, I accidentally sent that before I finished typing. >> >> The underlying IP layer which TCP sits on top of has no guaranteed >> delivery. But that's beside the point - a failure can happen at >> multiple endpoints and in multiple failure modes (missing data, single >> bit errors, bit reversals, double bit errors, etc.). The ECC of a hard >> disk plays no role in ensuring data integrity until AFTER the data has >> been written to disk. It cannot detect whether or not that data had >> been corrupted ENROUTE to the hard disk. > > The TCP header has a checksum field that guards the data against > single-bit errors that might occur in the IP layer. And w.r.t. your other remark: such checks have been added to other places as well. For example, the transfer from the motherboard to the disk used to be unchecked, but since the introduction of SATA there also is a CRC check on that connection.
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2016-01-14 10:35 +0000 |
| Message-ID | <n77tm5$e40$1@news.albasani.net> |
| In reply to | #10366 |
On 14/01/16 09:24, Rob wrote: > CPMDude <nospam@somewhere.net> wrote: >> On 1/13/2016 9:48 PM, CPMDude wrote: >>> On 1/13/2016 12:55 PM, The Natural Philosopher wrote: >>>> On 13/01/16 19:19, CPMDude wrote: >>>>> (TCP delivery is NOT guaranteed), >>>> Yes, it is. >>>> >>>> >>> No, it's not. >> >> Pardon me, I accidentally sent that before I finished typing. >> >> The underlying IP layer which TCP sits on top of has no guaranteed >> delivery. But that's beside the point - a failure can happen at >> multiple endpoints and in multiple failure modes (missing data, single >> bit errors, bit reversals, double bit errors, etc.). The ECC of a hard >> disk plays no role in ensuring data integrity until AFTER the data has >> been written to disk. It cannot detect whether or not that data had >> been corrupted ENROUTE to the hard disk. > > The TCP header has a checksum field that guards the data against > single-bit errors that might occur in the IP layer. > More than single bit. It has to be a pretty organised sort of corruption that defeats the error checking -- You can get much farther with a kind word and a gun than you can with a kind word alone. Al Capone
[toc] | [prev] | [next] | [standalone]
| From | Russell Gadd <russ.mail.lists@gmail.com> |
|---|---|
| Date | 2016-01-14 21:58 +0000 |
| Message-ID | <n795he$fq5$1@dont-email.me> |
| In reply to | #10357 |
On 12/01/16 09:46, Anssi Saari wrote: > > Just an aside: if your backup images are important to you, you should > never compress them, especially with gzip. ... > > ... > > So, instead of compression, I'd propose generating error correction data > with par2 for your images. > I am with Rob in not wanting an almost correct file. Rather than using par2 error correction techniques, I would create the uncompressed image then checksum it before gzipping. I can then unzip it and recheck which would validate the gzipping. I could go further and check the unzipped file byte for byte against the original with a re-read, or perhaps just read the original source into a checksum program. In that case I don't need the initial intermediate uncompressed image. A further thought is to use tee when reading the initial file to create the checksum while creating the gz file.
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Date | 2016-01-15 00:29 +0000 |
| Message-ID | <n79egc$f15$1@dont-email.me> |
| In reply to | #10376 |
On Thu, 14 Jan 2016 21:58:41 +0000, Russell Gadd wrote: > A further thought is to use tee when reading the initial file to create > the checksum while creating the gz file. > Alternatively: use rsync to maintain uncompressed backups. This is fast because rsync only does the minimum work needed to make the backup an exact copy of the filing system being backed up. This means that the first backup is slower than making a dd copy or using tar, but subsequent backups are a lot faster because unchanged files are not copied: deleted files are removed from the backup and added or changed files are backed up again. My main backups, which are kept off line are done this way - I back up all my systems (all Linux - house server, laptop and RPI) to a USB drive mounted on the house server and kept offline on a firesafe. There are two backup disks which are used alternately, so there is a backup copy in the firesafe at all times. If you're just backing up an RPi, the same trick will work just as well with two or more SD cards and a USB SD card reader. rsync is a standard Linux utility program and is part of the Raspbian distro. You can use it 'bare', but backups are easier if you run it from a bash script which mounts the SD card, runs rsync configured as you want it [*] and then unmounts the SD card. [*] rsync has a lot of potions for excluding files, etc. You may also want to use separate rsync runs for each partition on the main SD card. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
[toc] | [prev] | [next] | [standalone]
| From | fruit <fruit@invalid.org.uk> |
|---|---|
| Date | 2016-01-15 06:25 +0000 |
| Message-ID | <g0gmmc-49r.ln1@cubie.ply.me.uk> |
| In reply to | #10377 |
Martin Gregorie wrote: > On Thu, 14 Jan 2016 21:58:41 +0000, Russell Gadd wrote: > >> A further thought is to use tee when reading the initial file to create >> the checksum while creating the gz file. >> > Alternatively: use rsync to maintain uncompressed backups. +1 > [*] rsync has a lot of potions for excluding files, etc. You may also > want to use separate rsync runs for each partition on the main SD card. For those who find it confusing there is also grsync - rsync with a gui wrapper. If nothing else it's useful for generating suitable command lines - and a useful tutorial here https://www.sit.auckland.ac.nz/Rsync_and_Grsync_Backups_for_Linux fruit
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | comp.sys.raspberry-pi
csiph-web