Frequently asked questions
Getting started
- Cron set up and running: backups and restores started in Site administration run from cron (not needed if you run them from the command line)
- Preferably no PHP time limit for command-line scripts (see Tool vault was not able to raise max_execution_time setting)
- Enough temporary disk space for one chunk, typically under 5 GB
No SSH or direct database access is needed.
Backups
Backup size is the total size of all data in zip archives. Accurate total size of the backup can only be calculated during the backup itself when all files are added to archives.
During the backup pre-check tool_vault will give you a summary of the disk space taken by your database, datadir and files. When archived, this size will decrease but the compression rate largely depends on the types of files you have and can not be estimated in advance. For example, if you already have a lot of zip, mp4 or jpg files, they will not decrease in size when compressed. At the same time text and some other raw types may shrink to a fraction of their original size.
You can choose the region where your backup should be stored when you start the backup from the tool_vault plugin.
For Free and Light plans the options are: European Union, North America or APAC (Asia-Pacific).
For Pro plan you can choose between Europe (Ireland), UK, US, Canada and Australia. If you need any other region from the AWS supported regions (except for US GovCloud), please contact us at support@lmscloud.io and we will add it.
If you use Enterprise plan, you can connect any number of AWS S3 bucket in any regions.
Your lmsvault.io account and all information that you can see in the portal is stored in the EU.
Yes. All data to and from Vault is encrypted in transit (TLS), and every backup is encrypted at rest (AES-256). On Pro and Enterprise you can add passphrase encryption: only you know the passphrase. Your passphrase never leaves your Moodle site, so if you lose it, nobody can recover the backup.
Plugins: yes. List them in the Vault setting "Exclude plugins". Vault does everything it can to find the data of the excluded plugins, in the database and in the file storage, and leaves it out of the backup.
Plugins of the following plugin types cannot be excluded: activity modules (mod), advanced grading methods (gradingform), antivirus plugins (antivirus), authentication (auth), blocks (block), content types (contenttype), course formats (format), custom fields (customfield), enrolment methods (enrol), filters (filter), log stores (logstore), message outputs (message), portfolios (portfolio), question behaviours (qbehavior), question types (qtype), repositories (repository) and themes (theme). The data related to these plugins cannot be separated without altering other data. This cannot be done during a backup, but it can be done after the restore.
If you do not have the plugin code on the new site, keep them in the backup and restore with the setting "Allow restore with missing plugins". Vault can uninstall them during the restore (setting "Automatically remove missing plugins after restore"), or you can uninstall them later.
Files in the file storage: no. Every file in Moodle's file storage is in the backup, except the files of excluded plugins. Individual files can't be excluded.
Folders in the data folder (dataroot): yes. List them in the Vault setting "Exclude paths in dataroot", for example the antivirus quarantine or language packs. Caches, temporary files, sessions, locks and the trash folder are always left out.
Restores and upgrades
- tool_vault itself: yes. The plugin talks to Vault the same way in every version, so the restore works. We still recommend upgrading it for its bug fixes and improvements: see the changelog.
- Any other plugin: no. The new site needs the same or a newer version of every plugin in the backup. You can exclude a plugin from the backup instead, but then all its data is lost.
Sometimes the restore operation may fail due to various reasons like network issues, server timeouts or server configuration.
If restore failed during the database restore stage, the database will be in an inconsistent state and such restore can not be resumed. You will need to re-install Moodle and repeat the restore again.
If restore failed after the database restore stage (during dataroot or files stages), it can be resumed.
If you are restoring exactly the same version of Moodle and all plugins, no upgrade is required, you can just log in to the site, open the page "Vault - Site migration", find the failed restore and press "Resume" button. Restore will continue during the next cron run.
If upgrade is pending, cron can not run and you will not be able to resume restore from the web interface. It is still possible to resume the restore from the command line. Example:
Moodle 5.1 and later:
sudo -u www-data php public/admin/tool/vault/cli/site_restore.php --resume
Moodle 5.0 and earlier:
sudo -u www-data php admin/tool/vault/cli/site_restore.php --resume
It is not recommended to run upgrade process and then resume the restore since occasionally upgrade process may modify the files.
Yes, if the new site has their code installed, in versions that support the new Moodle and that include upgrade steps from the versions on the old site. The restore pre-check lists any that are missing or older. Vault has no control over third-party plugins: we can only hope they upgrade correctly, and can't guarantee it.
In fact, testing plugin updates is one of Vault's purposes: restore a copy onto a test site and try the upgrade there, plugins included, while your original site keeps running untouched.
Yes. The restored site uses the URL from config.php on the new server, and the restore doesn't change config.php.
Until you switch DNS, your domain still points to the old server. To restore before that, either:
- map the domain to the new server's IP address in your computer's hosts file, and use Vault in Site administration as usual;
- run the restore from the command line on the new server;
- or give the new server a temporary URL in config.php, restore and test there, and when you're ready change
$CFG->wwwrootto your site's URL.
Then point your domain's DNS to the new server.
To move the site to a different URL for good, restore under the new URL. Links to the old address inside your content (for example in course texts) stay as they were: update them with Moodle's "Search and replace" tool.
Plans and payment
There is no storage limit, however there are other restrictions:
- Maximum of 3 backups in any consecutive 24 hours.
- Maximum size of 1GB per backup.
- Backups automatically expire after 7 days.
You can choose a monthly subscription on either Light or Pro plan and cancel renewals.
You will need to estimate the size of your backup. If your backup size turns out to be bigger than you expected, you can increase the limits and pay the difference.
The Pro plan stores backups on Amazon S3. It supports passphrase encryption, but Amazon charges egress fees for downloading data, and every restore downloads the backup. So Pro includes a monthly amount of restores that you choose, from 50 GB: all the data your restores download in a month counts towards it. Pre-checks also download from the storage, but only the database structure, usually under 100 KB. On Light, restores are unlimited.
Storage amount: yes, at any time on the Subscription page of your account. It shows the new price before you confirm.
Plan: contact us at support@lmscloud.io.
Where your backups are stored: you choose the region each time you start a backup, so new backups can go to another region. Different plans use different storage providers. We don't have an automated way to migrate your existing backups, but we can help you with it: contact us at support@lmscloud.io.
Keep in mind that passphrase-protected backups can't be moved, and you can't add or change the passphrase of an existing backup.
Yes. Contact us at support@lmscloud.io to set up payment by invoice and bank transfer.
Cancel your subscription on the Subscription page of your account. Cancelling stops the renewal, and you can undo it until the end of the billing period. When the period ends, your account moves to the Free plan, and your stored backups are deleted automatically 7 days later.
Troubleshooting
Tool vault transfers large amounts of data to and from the database server. You may be exeriencing timeouts related to default settings.
We recommend the following MySQL/MariaDB server settings:
max_allowed_packet = 1073741824
connect_timeout = 31536000
wait_timeout = 31536000
net_read_timeout = 31536000
net_write_timeout = 31536000
max_allowed_packet allows Moodle to send larger amounts of data in a single packet, this combined with the increased timeout values allows Moodle to stay connected to the database while the server processes backup and restore instead of disconnecting with a timeout failure.
Here are the documentation pages for the settings:
MySQL: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html
MariaDB: https://mariadb.com/docs/server/ref/mdb/system-variables/
PHP settings on your server have an execution time limit. It is a recommended restriction when executing scripts from the web in order to prevent attacks.
Site backup and restore are executed from cron that runs in CLI (command-line interface) environment and should not have a time limit. However some servers still set a max_execution_time limit even for CLI scripts. Tool vault tries to raise this limit to 0 (unlimited) but if PHP runs in safe mode or the server configuration does not allow runtime changes, the limit will remain.
First, you need to find the php.ini file used by CLI. If you execute php --ini on your server (use the same path to php as your cron uses), you can see the path to php.ini file in the line "Loaded Configuration File". This is the file you need and it is not the same ini file as the one used by the web server.
Modify this php.ini file, find the line that starts with max_execution_time and change it to max_execution_time = 0. Now try to repeat backup or restore pre-check to see that the error is gone.
If you are unable to modify this file you may need to contact your hosting provider.
Can not find an answer to your question? Contact us at support@lmscloud.io