Simple plugin for database, themes and storage data backup - both manual and automatic.
Easy to use with many options for customize backup process:
- custom backups folder
- option to automate backups
- automatic cleanup process of old backup files
- list of existing backups with option to download them right from the backend
More info can be found in the documentation.
Small Backup
Simple backup for database (MySQL, SQLite), active theme and CMS storages
Compatibility
- plugin in version from 2.0.0. is intended only for OctoberCMS v4 and newer
- older versions (1.x.x) will run fine only on OctoberCMS v1, v2 and v3
Installation
GitHub clone into /plugins
dir:
git clone https://github.com/webula-cz/smallbackup
OctoberCMS backend (OC1)
Just look for 'Small Backup' in search field in:
Settings > Updates & Plugins > Install plugins
Permissions
Settings > Administrators
You can set permissions to restrict access in Settings > Small plugins > Small Backup.
Installation with composer
- Edit composer.json by adding new repository
"repositories": [ { "type": "vcs", "url": "https://github.com/webula-cz/smallbackup" } ]
- run in command line
composer require webula/smallbackup-plugin
Settings
- Default backups folder
storage/app/backup
- Default cleanup interval
7 days
You can download created backups from plugin Settings tabs Database, Theme and Storage or you can get it directly from backup folder (eg. with FTP).
It's recommended to put your backup folder into .htaccess' Black listed folders, e.g. RewriteRule ^storage/app/backup/.* index.php [L,NC]
.
How to make backups
Automatic backup (with scheduler)
Must be allowed in plugin's Settings!
There are default scheduler jobs for database and active theme to be backed up once a day.
See October CMS docs about scheduling jobs.
Automatic backup (without scheduler)
If you cannot run Cron command directly on your server/hosting, you can:
Use prepared URL
In plugin's backend settings page go to Settings tab and copy fixed part of the URL (which can be changed in plugin's config/config.php
file) and a variable part (which can be changed here in Settings tab).
The final URL is in form: https://www.domain.com/webula/smallbackup/run/trigger-46d62cbc-5e27-4bb0-87dd-19bb0012345678
Don't forget to allow backups from external URL in plugin's settings tabs (Database, Theme, Storage).
Use custom CMS page
title = "artisan" url = "/artisan/schedule" is_hidden = 0 == <?php function onStart() { wsb_backup_db($once = false, $connectionName = null,$noCleanup = false); wsb_backup_theme($once = false, $themeName = null, $noCleanup = false); wsb_backup_storage($once = false, $cmsStorage = null, $noCleanup = false); } ?> ==
Manual backup
You can create manual backup in plugin's Settings by clicking button Backup now
on Database, Theme or Storage tab.
Console commands
There are console commands ready:
-
php artisan smallbackup:db [connectionName] [--no-cleanup] [--once]
(connectionName is optional and respect config/database.php settings) -
php artisan smallbackup:theme [themeName] [--no-cleanup] [--once]
(themeName is optional and can be any folder name in themes/) -
php artisan smallbackup:storage [cmsStorage] [--no-cleanup] [--once]
(cmsStorage is optional and can be any storage registered in cms.storage config)
Our thanks goes to: OctoberCMS team members and supporters for this great system. Brooke Cagle for his photo. Font Awesome for nice icons.
Created by Webula in Czech Republic.
-
This plugin has not been reviewed yet.
-
2.0.0 |
October CMS 4 only support Oct 06, 2025 |
---|---|
1.5.1 |
Improved URI segmentation Mar 05, 2025 |
1.5.0 |
Added chinese lang (thanks @ZhiweiWu0425) Mar 05, 2024 |
1.4.0 |
Scheduler workaround because of disabled proc_open Jan 30, 2024 |
1.3.0 |
Added Doctrine 3.0 support Jan 28, 2024 |
1.2.3 |
Fine tuned TAR support Apr 17, 2023 |
1.2.2 |
TAR archives support with compression for Backup CMS Storage Apr 11, 2023 |
1.2.1 |
Fixed support for OC v3 Mar 08, 2023 |
1.2.0 |
New feature: Backup CMS storage Mar 08, 2023 |
1.1.3 |
Modify code for PHP 7.2 support Feb 27, 2023 |
1.1.2 |
Fix composer command in readme Oct 02, 2022 |
1.1.1 |
Updated DB type mapping Sep 28, 2022 |
1.1.0 |
Added option to override DB type mapping Sep 28, 2022 |
1.0.2 |
Fixed flash message content Sep 08, 2022 |
1.0.1 |
First version of SmallBackup Sep 02, 2022 |