|Subject||Re: [firebird-support] Re: Locking a database to cause a backup to fail|
>--- In email@example.com, "Steve Harp" <steve@...> wrote:At 11:03 AM 30/04/2006, Adam wrote:
> > Hi Guys,
> > Is there a way to lock a database to force a backup will fail?
> > Why would anyone want to do this you ask? Well, my boss is trying to
> > test an application and wants to see the response when a backup fails.
> > Thanks,
> > Steve
>Lots of ways.Umm, no.
>Add a not null field to a table with existing data and do not fill theThat will break a restore, but not a backup.
>pre-existing records with values is the easiest guaranteed method I
>Playing around yourself with system tables is also pretty reliable, asOr just deleting the database file and then trying to back it up. ;-)
>is connecting to a database before a restore is complete or switching
>forced writes off and hard powering down during an operation.
What Steve seems to be asking for is to simulate a scenario where a
gbak -b process would fall over once it had started, not simulating a
restore from a backup of a corrupt database.
The only idea I can think of would be to start a backup where you
were writing to a backup file on a remote filesystem and then
unplugging the network cable from the remote machine. Or you could
have some fun with a USB key or a memory card as the destination for
the backup file and yanking the device out while the backup was running...