Download the PHP package sylvainjule/backups without Composer
On this page you can find all versions of the php package sylvainjule/backups. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sylvainjule/backups
More information about sylvainjule/backups
Files in sylvainjule/backups
Package backups
Short Description Manage backups from the Kirby panel
License MIT
Informations about the package backups
Kirby Backups
This plugin allows you to create, download and manage backups from a dedicated View. Works together with kirby-janitor.
Overview
This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, you can consider making a donation of your choice.
- 1. Installation
- 2. Usage
- 3. License
- 4. Credits
1. Installation
Kirby 3: up to 1.0.3. Kirby 4: up to 1.0.5. Kirby 5: 1.1.0+.
You also must install kirby-janitor (and the CLI per janitor's instructions) for this plugin to work.
For older releases, install the kirby-janitor release from the same timeframe.
Download and copy this repository to
Alternatively, you can install it with composer:
2. Usage
The plugin will work out of the box, no need for additionnal setup.
You can, however, change the prefix of the backups' filename (default is backup-{TIMESTAMP}.zip
)
Any backup, created either with this plugin or with any of the janitor's options (CLI, CRON job, etc), will now show up in the Backups view.
Janitor stores the backups in a site/backups
folder. This folder isn't public and we should keep it that way. Therefore, anytime a user triggers a Download button, the plugin will create a copy of the given backup in a backups-temp
folder and expose an url from there.
When the user leaves the view, copies will be deleted.
This default public assets/backup-temp
folder can be changed to any name you'd like:
If you want more control over where backups are created / copied, you can set both paths with their dedicated option (if you change the public path, make sure to fill both the publicPath
and publicUrl
options):
You can enforce a maximum number of backups by setting the maximum
option to any integer (default is false
).
If this number is reached the oldest backup will be deleted automatically whenever a new backup is created.
If included in a client website, you should include a note specifying an expected frequency of backup creation / deletion (or set up a CRON job).
If you want to create backups from a CRON job and still benefit from this maximum
option, the plugin exposes a tweaked janitor webhook:
If you have set the maximum
option to a high amount, you can choose the pagination limit of the table with the limit
option (default is 20
).
There's also a way to disable the "Backups" menu-item for specific user roles:
3. License
MIT
4. Credits
- The plugin relies on the Janitor plugin by @bnomei, who tweaked it a bit in order to make the development of Backups easier. 🙏