PHPackages                             arifur/bookstack-backup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. arifur/bookstack-backup

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arifur/bookstack-backup
=======================

Backup management for Bookstack

v1.2.0(2mo ago)05↓90.9%MITPHPPHP ^8.2

Since Mar 30Pushed 2mo agoCompare

[ Source](https://github.com/arifur/bookstack-backup)[ Packagist](https://packagist.org/packages/arifur/bookstack-backup)[ RSS](/packages/arifur-bookstack-backup/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

BookStack Backup
================

[](#bookstack-backup)

Backup management package for BookStack.

Overview
--------

[](#overview)

This package adds a Backups area under settings and provides:

- Manual backup creation
- Backup history list with download and delete actions
- Delete confirmation page before file removal
- Backup settings for filename prefix, database include toggle, and max backups
- Automatic pruning by max backup count
- FTP remote upload settings for manual and scheduled backups

Access is protected by the settings-manage permission.

Installation
------------

[](#installation)

Add the package to BookStack:

```
"require": {
    "arifur/bookstack-backup": "dev-main"
},
"repositories": [
    {
        "type": "path",
        "url": "../bookstack-backup"
    }
]
```

Then run:

```
composer update
php artisan package:discover
php artisan cache:clear
php artisan view:clear
php artisan migrate
```

If you prefer publishing package migrations first:

```
php artisan vendor:publish --provider="Arifur\\BookstackBackup\\BackupServiceProvider" --tag="bookstack-backup-migrations"
php artisan migrate
```

Configuration
-------------

[](#configuration)

Publish config:

```
php artisan vendor:publish --tag="bookstack-backup-config"
```

Current config keys:

```
return [
    'storage_path' => storage_path('backups'),
    'max_backups' => 10,
];
```

Routes
------

[](#routes)

All routes are registered by the package and use middleware web, auth, and can:settings-manage.

MethodURIPurposeGET/settings/backupsBackup pagePOST/settings/backupsUpdate backup settingsGET/settings/backups/backup-settingsBackup settings pagePOST/settings/backups/backup-settingsSave backup settings page valuesPOST/settings/backups/createCreate backup nowGET/settings/backups/download/{filename}Download backupGET/settings/backups/delete/{filename}Delete confirmation pageDELETE/settings/backups/delete/{filename}Delete backupGET/settings/backups/scheduleSchedule page endpointPOST/settings/backups/scheduleSchedule save endpointGET/settings/backups/remoteRemote page endpointPOST/settings/backups/remoteRemote save endpointNote: Current sidebar navigation shows Backup and Backup Settings. Schedule and Remote routes exist but are not shown in the sidebar by default.

Features
--------

[](#features)

- Manual backup creation (database and/or uploads)
- Backup history with download, hash, and delete
- Delete confirmation page before file removal
- Backup settings for filename prefix, database include toggle, and max backups
- Automatic pruning by max backup count
- FTP remote upload for manual and scheduled backups
- **Enable Remote Backup**: master toggle to globally enable/disable all remote uploads
- Remote upload progress indicator on manual backup
- Schedule backups via UI (requires cron or Laravel scheduler)
- Notification email field is currently disabled in the UI

Running Scheduled Backups
-------------------------

[](#running-scheduled-backups)

You can run scheduled backups using either of these approaches.

### Option A: Direct Cron Command (Without Laravel Scheduler)

[](#option-a-direct-cron-command-without-laravel-scheduler)

Run the package command directly from cron. This does not use Laravel scheduler.

Edit crontab:

```
crontab -e
```

Add this line:

```
* * * * * cd /path/to/your/project && /usr/bin/php artisan bookstack-backup:run-scheduled >> /var/log/bookstack-backup-cron.log 2>&1

```

Use the correct PHP binary path on your server (for example `/usr/bin/php` or `/usr/local/bin/php`).

Quick manual test:

```
cd /path/to/your/project
/usr/bin/php artisan bookstack-backup:run-scheduled
```

### Option B: Laravel Scheduler

[](#option-b-laravel-scheduler)

Run Laravel's scheduler from cron, then let the app invoke the package schedule:

```
* * * * * cd /path/to/your/project && php artisan schedule:run >> /dev/null 2>&1

```

Replace `/path/to/your/project` with your BookStack project root (where `artisan` is located).

Configuring Scheduled Backups
-----------------------------

[](#configuring-scheduled-backups)

To set up and configure scheduled backups:

1. **Install and publish the package config (if not already done):**

    ```
    composer update
    php artisan vendor:publish --tag="bookstack-backup-config"
    php artisan cache:clear
    php artisan view:clear
    ```
2. **Configure your backup schedule in the BookStack UI:**

    - Go to **Settings → Backups → Schedule**.
    - Enable scheduled backups using the toggle.
    - Set your preferred schedule:
        - **Frequency**: Choose daily, weekly, or monthly.
        - **Time**: Set the time of day for the backup to run.
        - **Day of Week**: (If weekly) Select which day backups should run.
        - **Day of Month**: (If monthly) Select which day backups should run.
    - (Optional) Toggle whether to keep a local copy after remote upload.
    - Save your changes.
3. **Set up one of the scheduler execution options:**

    Edit your crontab:

    ```
    crontab -e
    ```

    Option A (direct package command):

    ```
    * * * * * cd /path/to/your/project && php artisan bookstack-backup:run-scheduled >> /dev/null 2>&1

    ```

    Option B (Laravel scheduler):

    ```
    * * * * * cd /path/to/your/project && php artisan schedule:run >> /dev/null 2>&1

    ```

    Both options should run every minute.

**Note:**

- Use one scheduler execution option to avoid duplicate runs.
- The notification email field is currently disabled in the UI.

Notes
-----

[](#notes)

- Backups are created as zip files.
- History currently shows date-only in list rows, with full filename and full created timestamp on hover.
- Delete action is a two-step flow through a confirmation page.

Troubleshooting
---------------

[](#troubleshooting)

Backups fail to create:

1. Ensure mysqldump is installed and available on PATH.
2. Verify DB credentials in your environment.
3. Ensure the backup storage path is writable.

Package not appearing:

1. Run composer update.
2. Clear view and app caches.
3. Check logs in storage/logs.

Migrations not applied:

1. Run `php artisan package:discover`.
2. Run `php artisan migrate`.
3. If needed, publish migrations with `php artisan vendor:publish --provider="Arifur\\BookstackBackup\\BackupServiceProvider" --tag="bookstack-backup-migrations"` then run `php artisan migrate` again.

Publishing Assets
-----------------

[](#publishing-assets)

Publish views:

```
php artisan vendor:publish --provider="Arifur\\BookstackBackup\\BackupServiceProvider" --tag="bookstack-backup-views"
```

Publish translations:

```
php artisan vendor:publish --provider="Arifur\\BookstackBackup\\BackupServiceProvider" --tag="bookstack-backup-lang"
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance83

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/088fe18b6ad0c76bc7468404ce694245b2e2f911f7fa5d80133b6b9448b93727?d=identicon)[arifur](/maintainers/arifur)

---

Top Contributors

[![arifur](https://avatars.githubusercontent.com/u/9461401?v=4)](https://github.com/arifur "arifur (7 commits)")

### Embed Badge

![Health badge](/badges/arifur-bookstack-backup/health.svg)

```
[![Health](https://phpackages.com/badges/arifur-bookstack-backup/health.svg)](https://phpackages.com/packages/arifur-bookstack-backup)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M267](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10533.5M991](/packages/illuminate-pagination)[illuminate/redis

The Illuminate Redis package.

8314.4M363](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

224.5M132](/packages/illuminate-cookie)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
