BCairns\BackupRestore\BackupRestore
Synopsis
class BackupRestore
extends LeftAndMain
{
- // members
- private static string $version = '4.x';
- private static array $allowed_actions = ;
- private static array $required_permission_codes = ;
- private static string $menu_title = 'Backup/Restore';
- private static string $menu_icon = 'bcairns/silverstripe-backuprestore:images/menuicon.png';
- private static integer $menu_priority = 2;
- private static string $url_segment = 'backuprestore';
- private static string $db_temp_dir = 'assets/.protected/_db';
- private static boolean $create_htaccess = true;
- // methods
- public static void getPath()
- public static void makeFolder()
- public void restore()
- public void backup()
- public void setRestoreMessage()
- public void RestoreMessage()
- public void IsLive()
- public void _restore_db_from_file()
- public void _read_sql_command_from_file()
- public void query()
- public void queryValue()
- public void _backup_db_to_file()
- public void _write_db_to_file()
- public void _get_tables()
- public void _get_views()
- public void _get_table_structure_sql()
- public void _dump_table_data_sql_to_file()
- public void _get_view_create_sql()
- public void _get_sql_file_header()
- public void _get_sql_file_footer()
- public void _gzip_encode()
- public void _gzip_decode()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Tasks
Line | Task |
---|---|
347 | config values for these |
440 | fill in all the placeholders |
Members
private
- $allowed_actions
- $create_htaccess
- $db_temp_dir
- $required_permission_codes
- $url_segment
- $version
Methods
public
- IsLive()
- RestoreMessage()
- _backup_db_to_file() — Backup the databases to a file.
- _dump_table_data_sql_to_file() — Get the sql to insert the data for a given table
- _get_sql_file_header() — The header for the top of the sql dump file. These commands set the connection character encoding to help prevent encoding conversion issues.
- _get_table_structure_sql() — Get the sql for the structure of the given table.
- _get_tables() — Get a list of tables in the db.
- _get_view_create_sql() — Get the sql for the structure of the given view.
- _get_views() — Get a list of views in the db.
- _gzip_decode() — Gzip decode a file.
- _gzip_encode() — Gzip encode a file.
- _read_sql_command_from_file() — Read a multiline sql command from a file.
- _restore_db_from_file() — Backup the databases to a file.
- _write_db_to_file()
- backup()
- getPath()
- makeFolder()
- query()
- queryValue()
- restore()
- setRestoreMessage()