Skip to content

Commit 4e99ec8

Browse files
committed
Renaming, changing readme
1 parent 20ce720 commit 4e99ec8

File tree

11 files changed

+51
-121
lines changed

11 files changed

+51
-121
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to the tool_vault plugin will be documented in this file.
44

5+
## Unreleased
6+
### Changed
7+
- Changed plugin name to "Vault - Site backup and migration" to better reflect its purpose.
8+
- Button style changes, changes in README file.
9+
510
## [3.9.13] - 2025-05-10
611
### Changed
712
- New version numbering scheme. The version number now has format X.Y.Z, where:

README.md

Lines changed: 9 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,14 @@
1-
# Vault - Site migration #
1+
# Vault - Site backup and migration #
22

33
Vault allows you to make a **full backup of the site**, push it to the cloud and then **restore** on any Moodle site.
44

5-
See also https://lmsvault.io/
6-
7-
### Features:
8-
- Vault will export and import **database** structure, schema modifications, tables content and sequences.
9-
- Vault can restore not only into a different DB version but also into a **different DB type**
10-
(i.e. from mysql to postgres or vice versa);
11-
- Vault plugin does not need to have access to mysqldump or pgdump, the database will be exported using Moodle DML.
12-
- Vault will export and import all **files**, regardless of the file system (local disk, S3, etc), the file
13-
system on the restored site can be different from the backup site;
14-
- Vault will export and import additional folders in the **dataroot**.
15-
- After restore Vault will perform some necessary **post-restore** actions, for example, purge caches, kill all
16-
sessions, optionally reset site identifier, optionally uninstall missing plugins etc.
17-
- Vault does not back up or restore Moodle code or add-on plugins code.
18-
- Vault does not back up or restore its own tables.
19-
- Other plugins can be excluded during backup/restore (with some limitations).
20-
- All data transferred to or from tool_vault is encrypted during transit using SSL/TLS.
21-
- In some plans you may choose to set a passphrase during backup which will be used to encrypt data stored
22-
at rest in the cloud.
23-
Vault API never has access to your passphrase, it is only used to sign the
24-
requests to Amazon S3.
25-
26-
### Requirements:
27-
- The site where you restore must have **Moodle installed**, it can be a fresh installation;
28-
- Plugin **tool_vault** must be installed on both sites - where you back up and where you restore;
29-
- The site where you are restoring to must have the same or higher Moodle version than the backed up site;
30-
- Supported databases - **postgres**, **mysql** and **mariadb**. Other database types are not yet supported;
31-
- There are some restrictions on database modifications, see below;
32-
- You need to have **enough space** in your temp folder on the backed up site and enough space to store
33-
downloaded files on the site where you plan to restore.
34-
35-
## Site backup with Vault
36-
37-
- Login as site administrator and navigate to **Site administration > Server > Vault - Site migration**
38-
- Before backup, Vault performs a number of pre-checks. They can also
39-
be executed independently. The results are displayed on the 'Site backup' page.
40-
- Backup can be performed only when all pre-checks are successful, which means you have enough disk space,
41-
and do not have (or excluded) incompatible database schema modifications. The pre-checks will run
42-
again in the beginning of the backup process.
43-
- If you want to make changes to what needs to be backed up, you can do it in the "Settings" section.
44-
- When everything is ready, open the **"Site backup"** section, register with the LMSVault cloud (or enter existing
45-
API key) and schedule a backup.
46-
- Backup will be performed during the next cron run. Every step is logged and you can monitor the process
47-
on the backup page.
48-
49-
### Protecting your backup site from accidental restores
5+
<p align="center"><big><big><strong>
6+
Find more information about Vault features at <a href="https://lmsvault.io">https://lmsvault.io</a> or <a href="https://moodle.org/plugins/tool_vault">https://moodle.org/plugins/tool_vault</a>
7+
</strong></big></big></p>
8+
9+
This README file contains information for the **server administrators**.
10+
11+
### Protecting your site from restores
5012

5113
The ability to restore is disabled by default when `tool_vault` is installed. Restores are not
5214
possible if you did not register an account, did not enter an API key, or your API key does not allow restores.
@@ -58,29 +20,6 @@ $CFG->forced_plugin_settings = $CFG->forced_plugin_settings ?? [];
5820
$CFG->forced_plugin_settings['tool_vault'] = ['allowrestore' => 0];
5921
```
6022

61-
## Site restore with Vault
62-
63-
- Login as site administrator and navigate to **Site administration > Server > Vault - Site migration**
64-
- Go to the "Settings" section and check **enable restores** on this site.
65-
- Enter your **API key** that you received during registration when you performed the backup.
66-
- In the **"Site restore"** section you will see the list of all backups that are available for you to restore.
67-
This list is cached and you can refresh it at any moment to look for new backups.
68-
- **Choose the backup** you want to restore, execute pre-checks for it to make sure that you have enough
69-
disk space and if you need to adjust the restore settings.
70-
- **Schedule the restore**. You will be provided with a link to the restore progress page that can be accessed
71-
without authentication. Remember that during restore everything is erased from the database and
72-
nobody will be able to login.
73-
- Remember to check **the restore log** since it may not be possible to send a notification to the person who
74-
initiated restore after the restore process has finished because the site configuration will be overridden
75-
with the config of the backed up site.
76-
- **After restore** has completed, login with the username and password of a user from the backed up site
77-
(remember that the users table in the database was replaced).
78-
- If your site version is higher than the version of the restored site or you have plugins that were not
79-
present on the restored site, you will be prompted to run the **upgrade process**.
80-
- If the backed up site had **plugins** that are not present on the restored site, all database tables, settings,
81-
and files of these plugins will be restored and Moodle will report them as **"Missing from disk"**. You will
82-
need to install these plugins code yourself.
83-
8423
## Backup and restore of site configuration
8524

8625
- As part of backing up the database, Vault backs up the **tables 'config' and 'config_plugins'**.
@@ -91,21 +30,7 @@ $CFG->forced_plugin_settings['tool_vault'] = ['allowrestore' => 0];
9130
backed up in the **"Config overrides" pre-check** on the backed up site.
9231
- On the restored site if there is anything set in **config.php** it will take precedence over the restored
9332
config settings values.
94-
- Vault does not backup or restore `cache`, `localcache`, or `muc` directories in the dataroot.
95-
96-
## Backup and restore of database modifications
97-
98-
- As part of the **"Database modifications" pre-check** Vault analyses the actual database and compares it
99-
with the schema definitions in install.xml files in Moodle core, standard and add-on plugins.
100-
- There are the following **types** of possible database modifications: extra tables, missing tables, extra
101-
indexes, missing indexes, extra table fields, missing table fields, modified table fields.
102-
- Note that not all **field modifications** can be detected, for example, changing the length or precision
103-
of the int/double/float fields.
104-
- Some database modifications are not supported in the Moodle DML, for example, indexes
105-
on text fields, varchar fields with length over 1333. If you have such modifications, the pre-check
106-
will fail and Vault **will not be able to perform backup**.
107-
- In the "Settings" section you can specify that some **modifications should be excluded**. You can re-run
108-
the pre-check after you modified the settings to see if it passes.
33+
- When you exclude plugins from backup or choose to preserve plugin data during restore, the settings from these plugins will not be backed up or restored.
10934

11035
## CLI access
11136

db/hooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

1717
/**
18-
* Hook callbacks for Vault - Site migration
18+
* Hook callbacks for Vault - Site backup and migration
1919
*
2020
* @package tool_vault
2121
* @copyright Marina Glancy

lang/en/tool_vault.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
$string['lastupdated'] = 'Last updated';
176176
$string['loginexplanation'] = 'Create an account on {$a} to be able to backup or restore the site. With the <b>free account</b> you will be able to backup and restore small sites and store them up to 7 days in the cloud.';
177177
$string['manageremoteaccount'] = 'Manage your account';
178-
$string['messageprovider:statusupdate'] = 'Status update for Vault - Site migration';
178+
$string['messageprovider:statusupdate'] = 'Status update for Vault - Site backup and migration';
179179
$string['moodleversion_backupinfo'] = 'Backup made in version {$a->version} (Moodle {$a->branch})';
180180
$string['moodleversion_fail'] = 'Site version number has to be greater than or equal to the version in the backup. This backup is {$a->version} and this site is {$a->siteversion}';
181181
$string['moodleversion_fail_cannotupgrade'] = 'Restore is blocked because Moodle cannot upgrade from {$a->backuprelease} to {$a->currentrelease}. See the <a href="{$a->url}">environment page</a> for upgrade requirements. Vault is able to upgrade from this version if you choose "Automatically upgrade Moodle after restore" in the <a href="{$a->settingsurl}">settings</a>.';
@@ -239,11 +239,11 @@
239239
$string['settings_backupexcludetables'] = 'Exclude tables';
240240
$string['settings_backupexcludetables_desc'] = 'Vault will back up all tables that start with the prefix \'{$a->prefix}\' even if they are not listed in xmldb schemas of the core or installed plugins.<br>Here you can list extra tables that should not be backed up. Use an asterisk (\'*\') to exclude all extra tables.<br>You must include the table prefix when excluding tables.';
241241
$string['settings_clionly'] = 'Allow to perform site backup and restore from CLI only';
242-
$string['settings_clionly_desc'] = 'Checking this will hide the "Vault - Site migration" from the site administration and prevent access to backup and restore. ';
242+
$string['settings_clionly_desc'] = 'Checking this will hide the "Vault - Site backup and migration" from the site administration and prevent access to backup and restore. ';
243243
$string['settings_desc'] = "Vault plugin settings where you can configure what to exclude during backup or preserve during restore.";
244244
$string['settings_forcedebug'] = 'Force debugging during backup and restore';
245245
$string['settings_forcedebug_desc'] = 'Regardless of the site configuration, developer debugging and debug display will be enabled during backup and restore. This will affect the tool vault logs only, and will not change the values for these settings that are included in the backup.';
246-
$string['settings_header'] = 'Vault - Site migration settings';
246+
$string['settings_header'] = 'Vault - Site backup and migration settings';
247247
$string['settings_headerbackup'] = 'Backup settings';
248248
$string['settings_headerrestore'] = 'Restore settings';
249249
$string['settings_restorepreservedataroot'] = 'Preserve paths in dataroot';

tests/behat/extended_free.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: Performing full site backup and restore with a free account in Vault
1010
And the following config values are set as admin:
1111
| allowrestore | 1 | tool_vault |
1212
When I log in as "admin"
13-
And I navigate to "Server > Vault - Site migration" in site administration
13+
And I navigate to "Server > Vault - Site backup and migration" in site administration
1414
And I click on "Site backup" "link" in the "region-main" "region"
1515
And I press "Start backup"
1616
And I wait until "Automatically expire backup after" "field" exists
@@ -26,7 +26,7 @@ Feature: Performing full site backup and restore with a free account in Vault
2626
And I should see "Backup finished"
2727
# Restore pre-check
2828
And I log in as "admin"
29-
And I navigate to "Server > Vault - Site migration" in site administration
29+
And I navigate to "Server > Vault - Site backup and migration" in site administration
3030
And I click on "Site restore" "link" in the "region-main" "region"
3131
And I click on "Refresh" "link" in the "region-main" "region"
3232
And I click on "Run pre-check" "button" in the row of my vault backup
@@ -39,18 +39,18 @@ Feature: Performing full site backup and restore with a free account in Vault
3939
And I log out
4040
# Restore
4141
And I log in as "admin"
42-
And I navigate to "Server > Vault - Site migration" in site administration
42+
And I navigate to "Server > Vault - Site backup and migration" in site administration
4343
And I click on "Site restore" "link" in the "region-main" "region"
4444
And I click on "Restore this backup" "button" in the row of my vault backup
4545
And I click on "Restore this backup" "button" in the "Restore this backup" "dialogue"
4646
And I should see "[info] Restore scheduled"
4747
And I wait "2" seconds
4848
And I run the scheduled task "tool_vault\task\cron_task"
4949
And I log in as "admin"
50-
And I navigate to "Server > Vault - Site migration" in site administration
50+
And I navigate to "Server > Vault - Site backup and migration" in site administration
5151
And I click on "Site restore" "link" in the "region-main" "region"
5252
And I should see "Restore completed"
53-
And I follow "Vault - Site migration"
53+
And I follow "Vault - Site backup and migration"
5454
And I click on "History" "link" in the "region-main" "region"
5555
And I click on "View details" "link" in the "Past backups on this site" "table"
5656
And the following should exist in the "Backup details" table:
@@ -61,7 +61,7 @@ Feature: Performing full site backup and restore with a free account in Vault
6161
And I follow "Expand logs"
6262
And I should not see "Expand logs"
6363
And I should see "Collapse logs"
64-
And I navigate to "Server > Vault - Site migration" in site administration
64+
And I navigate to "Server > Vault - Site backup and migration" in site administration
6565
And I click on "History" "link" in the "region-main" "region"
6666
And I click on "View details" "link" in the "Past restores on this site" "table"
6767
And the following should exist in the "Restore details" table:

tests/behat/extended_light.feature

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: Performing full site backup and restore with a light account in Vault
1010
And the following config values are set as admin:
1111
| allowrestore | 1 | tool_vault |
1212
When I log in as "admin"
13-
And I navigate to "Server > Vault - Site migration" in site administration
13+
And I navigate to "Server > Vault - Site backup and migration" in site administration
1414
And I click on "Site backup" "link" in the "region-main" "region"
1515
And I press "Start backup"
1616
And I wait until "Automatically expire backup after" "field" exists
@@ -26,7 +26,7 @@ Feature: Performing full site backup and restore with a light account in Vault
2626
And I should see "Backup finished"
2727
# Restore pre-check
2828
And I log in as "admin"
29-
And I navigate to "Server > Vault - Site migration" in site administration
29+
And I navigate to "Server > Vault - Site backup and migration" in site administration
3030
And I click on "Site restore" "link" in the "region-main" "region"
3131
And I click on "Refresh" "link" in the "region-main" "region"
3232
And I click on "Run pre-check" "button" in the row of my vault backup
@@ -39,18 +39,18 @@ Feature: Performing full site backup and restore with a light account in Vault
3939
And I log out
4040
# Restore
4141
And I log in as "admin"
42-
And I navigate to "Server > Vault - Site migration" in site administration
42+
And I navigate to "Server > Vault - Site backup and migration" in site administration
4343
And I click on "Site restore" "link" in the "region-main" "region"
4444
And I click on "Restore this backup" "button" in the row of my vault backup
4545
And I click on "Restore this backup" "button" in the "Restore this backup" "dialogue"
4646
And I should see "[info] Restore scheduled"
4747
And I wait "2" seconds
4848
And I run the scheduled task "tool_vault\task\cron_task"
4949
And I log in as "admin"
50-
And I navigate to "Server > Vault - Site migration" in site administration
50+
And I navigate to "Server > Vault - Site backup and migration" in site administration
5151
And I click on "Site restore" "link" in the "region-main" "region"
5252
And I should see "Restore completed"
53-
And I follow "Vault - Site migration"
53+
And I follow "Vault - Site backup and migration"
5454
And I click on "History" "link" in the "region-main" "region"
5555
And I click on "View details" "link" in the "Past backups on this site" "table"
5656
And the following should exist in the "Backup details" table:
@@ -61,7 +61,7 @@ Feature: Performing full site backup and restore with a light account in Vault
6161
And I follow "Expand logs"
6262
And I should not see "Expand logs"
6363
And I should see "Collapse logs"
64-
And I navigate to "Server > Vault - Site migration" in site administration
64+
And I navigate to "Server > Vault - Site backup and migration" in site administration
6565
And I click on "History" "link" in the "region-main" "region"
6666
And I click on "View details" "link" in the "Past restores on this site" "table"
6767
And the following should exist in the "Restore details" table:
@@ -89,7 +89,7 @@ Feature: Performing full site backup and restore with a light account in Vault
8989
| restorepreservepasswords | admin | tool_vault |
9090
# Restore pre-check
9191
And I log in as "admin"
92-
And I navigate to "Server > Vault - Site migration" in site administration
92+
And I navigate to "Server > Vault - Site backup and migration" in site administration
9393
And I click on "Site restore" "link" in the "region-main" "region"
9494
And I click on "Refresh" "link" in the "region-main" "region"
9595
And I click on "Run pre-check" "button" in the row of my vault backup
@@ -100,7 +100,7 @@ Feature: Performing full site backup and restore with a light account in Vault
100100
And I log out
101101
# Restore
102102
And I log in as "admin"
103-
And I navigate to "Server > Vault - Site migration" in site administration
103+
And I navigate to "Server > Vault - Site backup and migration" in site administration
104104
And I click on "Site restore" "link" in the "region-main" "region"
105105
And I click on "Restore this backup" "button" in the row of my vault backup
106106
And I click on "Restore this backup" "button" in the "Restore this backup" "dialogue"
@@ -110,10 +110,10 @@ Feature: Performing full site backup and restore with a light account in Vault
110110
And I reload the page
111111
And I should see "Completed" in the "Status" "table_row"
112112
And I log in as "admin"
113-
And I navigate to "Server > Vault - Site migration" in site administration
113+
And I navigate to "Server > Vault - Site backup and migration" in site administration
114114
And I click on "Site restore" "link" in the "region-main" "region"
115115
And I should see "Restore completed"
116-
And I follow "Vault - Site migration"
116+
And I follow "Vault - Site backup and migration"
117117
And I click on "History" "link" in the "region-main" "region"
118118
And I click on "View details" "link" in the "Past restores on this site" "table"
119119
And the following should exist in the "Restore details" table:

0 commit comments

Comments
 (0)