php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70950 Make SQLite3 Online Backup API available
Submitted: 2015-11-20 13:11 UTC Modified: 2016-09-02 19:47 UTC
Votes:8
Avg. Score:4.4 ± 0.7
Reproduced:8 of 8 (100.0%)
Same Version:2 (25.0%)
Same OS:2 (25.0%)
From: dexen dot devries at gmail dot com Assigned:
Status: Open Package: SQLite related
PHP Version: 5.6.15 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-11-20 13:11 UTC] dexen dot devries at gmail dot com
Description:
------------
SQLite3 provides Online Backup API (https://www.sqlite.org/backup.html) for copying databases in safe way. Please expose the API through the SQLite3 extension.

Test script:
---------------
$source = SQLite3('original.sqlite');
$dest = SQLite3('backup.sqlite');

  # equivalent of C sqlite3_backup_init()
$backup = new SQLite3Backup($dest, $source);

  # equivalent of C sqlite3_backup_step()
$backup->step($npages = -1);

  # equivalent of C sqlite3_backup_finish
$backup->finish();

echo 'backup complete.';

Expected result:
----------------
backup complete.

Actual result:
--------------
class SQLite3Backup does not exist

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-02 19:47 UTC] cmb@php.net
I'm on the fence whether it would be better to expose the full API
or just a single method (say, SQLite3::backupFrom(SQLite3
$source)). The former would have obvious advantages for large
databases, but the latter would be sufficient for small databases
(in particular loading and saving in-memory databases), and would
be much more easier to implement and use, and therefore less
error-prone.

Thoughts?
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed May 22 18:01:28 2019 UTC