SQLite3::backup
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
SQLite3::backup
Референца за `sqlite3.backup.php` со подобрена типографија и навигација.
SQLite3::backup
(PHP 7 >= 7.4.0, PHP 8)
SQLite3::backup — Backup one database to another database
= NULL
$destination, string $sourceDatabase = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $destinationDatabase = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE): boolSQLite3::backup() copies the contents of one database into another, overwriting the contents of the destination database. It is useful either for creating backups of databases or for copying in-memory databases to or from persistent files.
As of SQLite 3.27.0 (2019-02-07), it is also possible to use the statement
VACUUM INTO 'file.db'; to backup the database to a new file.
Параметри
destination-
A database connection opened with SQLite3::open().
sourceDatabase-
The database name is
"main"for the main database,"temp"for the temporary database, or the name specified after theASkeyword in anATTACHstatement for an attached database. destinationDatabase-
секоја вредност ќе биде прифатена и ќе биде претворена во булова според вообичаените PHP правила.
sourceDatabasebut for thedestination.
Вратени вредности
Патеката до PHP скриптата што треба да се провери. true на успех или false при неуспех.
Примери
Example #1 Backup an existing database
<?php
// $conn is a connection to an already opened sqlite3 database
$backup = new SQLite3('backup.sqlite');
$conn->backup($backup);
?>