Subject | Re: [firebird-support] Why does gbak not check disk space? |
---|---|
Author | Gary Benade |
Post date | 2004-08-11T09:55:39Z |
> Hmmm, gbak has no way of knowing beforehand what the volume of data willI would assume gbak writes to the backup file line by line as it works its
> be. How would you suggest it could be made possible?
> how could gbak tell whether all of the disk space available at the
> beginning would still be there at the end?
way through the data. I would also assume gbak uses standard file io
functions, like fwrite(). These proven functions return a status, so it
should require no more than a couple of lines of of code to detect a failed
write and abort the entire backup process since it would be corrupt anyway.
> The only way YOU can anticipate the conditions and protected yourI, as a developer, always try and make things user friendly. Imagine
> automated
> procedures is to monitor the sizes of database files and backup files over
> time and to treat disk capacity as something you have to make provision
> for, not entrust to pot luck.
microsoft had the same attitude. Copy a file from disk c to d. If it says
"copy OK" I trust it and delete the original without another thought,
because I know windows did what it said it did, and if it didnt it would say
so.
IMHO the success message on failure should be considered a bug.
Gary