#1 2018-10-09 11:06:05

factor200x
Member
Registered: 2017-05-23
Posts: 15

Backup and Restore

Hello everyone,

I guess I'm having another thought mistake. I create a backup of the databases with the function BackupBackground(). That works wonderfully!

Now I ask myself the question, how is the restore done?  In the sources I see that the function Restore() should not be used and it is referred to the function BackupBackground(). But this is only for creating the backup and not for restoring or do I see this wrong?

For a push in the right direction I thank you in advance!

Olaf

Offline

#2 2018-10-09 12:24:35

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 210

Re: Backup and Restore

You would use BackupBackground in reverse order or go the old fashion way of making a direct copy of the backup file (It's perfectly valid but not recommended even by official sqlite docs). Either way you would have to stop your server sqlite instance to release the file lock so you can rename or delete the corrupted db, otherwise BackupBackground will fail.

Last edited by pvn0 (2018-10-09 12:27:18)

Offline

Board footer

Powered by FluxBB