Re: 1.6.12: works; disk full handling
Miek Gieben <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.hdup.general |
|---|---|
| Message-ID | <[email protected]> |
[On 30 Apr, @17:06, Boris wrote in "Re: [hdup-user] 1.6.12: works; ..."] > > On Wednesday, April 30, 2003, at 07:47 AM, Miek Gieben wrote: > > >This is what tar does on a full disk: > >$ tar cvf trailer_final_1000_dl.mov.tar trailer_final_1000_dl.mov > >trailer_final_1000_dl.mov > >tar: trailer_final_1000_dl.mov.tar: Wrote only 2048 of 10240 bytes > >tar: Error is not recoverable: exiting now > > > >>In case it matters, I was running a local, monthly backup with -V. > > > >it's a tar thing - and difficult to detect. > > I don't working on a patch, but could use some guidance on the design. > > Do you currently have anything in place that looks at the output of tar > and could detect that message? Or could the message simply be passed > along to hdup's standard error? > > How about exit status - I assume tar exits with a non-zero status when > it hits this unrecoverable error. Could that be detected? there are two exit status you can get from tar, well three actually, 0, 2 or 128. 0 is ok, 2 and 128 (i thought it was 128) mean something bad has happened - not finding a file in a archive for instance yields exit status of 2. Disk full also yields a exit status of 2. > And what is the correct behavior is in this case? It seems to require > some manual intervention no matter what, so perhaps leaving the partial > file there is fine as long as a loud warning is generated. Possibly it i've implemented a statfs prior to the backup. With this hdup can check if there is enough free space on the partition. This can be used by saying "free = 5G" in the config file. If there is not 5G free on the partition the backup is cancelled. > should be renamed in such a way that it wouldn't be considered a > successful run by future invocations of hdup? What do others think it > ought to do? Something like that is maybe also a good idea. grtz Miek