[PR #3783] [CLOSED] Install spatie/laravel-backup for automated & easy backups #6264

Closed
opened 2026-02-05 10:28:03 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3783
Author: @axelrindle
Created: 10/14/2022
Status: Closed

Base: developmentHead: feature/backup


📝 Commits (2)

📊 Changes

30 files changed (+1331 additions, -1 deletions)

View changed files

📝 .env.example (+10 -0)
📝 .env.example.complete (+3 -0)
app/Config/backup.php (+269 -0)
📝 app/Config/filesystems.php (+6 -0)
📝 composer.json (+1 -0)
📝 composer.lock (+202 -1)
resources/lang/vendor/backup/ar/notifications.php (+35 -0)
resources/lang/vendor/backup/cs/notifications.php (+35 -0)
resources/lang/vendor/backup/da/notifications.php (+35 -0)
resources/lang/vendor/backup/de/notifications.php (+35 -0)
resources/lang/vendor/backup/en/notifications.php (+35 -0)
resources/lang/vendor/backup/es/notifications.php (+35 -0)
resources/lang/vendor/backup/fa/notifications.php (+35 -0)
resources/lang/vendor/backup/fi/notifications.php (+35 -0)
resources/lang/vendor/backup/fr/notifications.php (+35 -0)
resources/lang/vendor/backup/hi/notifications.php (+35 -0)
resources/lang/vendor/backup/id/notifications.php (+35 -0)
resources/lang/vendor/backup/it/notifications.php (+35 -0)
resources/lang/vendor/backup/ja/notifications.php (+35 -0)
resources/lang/vendor/backup/nl/notifications.php (+35 -0)

...and 10 more files

📄 Description

Description

spatie/laravel-backup is a package for automated backup creation.

The default configuration includes the following data in a backup:

  • Complete database dump
  • public/uploads
  • storage/uploads
  • .env

I incorporated the data mentioned in the docs.

This does not add any possibility to create backups from the UI. Backups can be created by running the following Artisan command:

php artisan backup:run

If the user wishes he may create a database-only backup:

php artisan backup:run --only-db

I like this package because it lets me create backups with ease and without having to deal with custom scripts. And I'm lazy ¯\_(ツ)_/¯

Points to discuss

Configuration

The package is highly configurable and I already changed some of the defaults, for example the following:

336bd22046/app/Config/backup.php (L119-L122)

In my eyes the biggest point to discuss is: should there be anything else to configure via environment variables? I'd say no to keep the complexity of the config file small.

Restore

The package does not provide the possibility to restore backups which still leaves that up to the user.

I don't think it'd be worth maintaining such logic in the core project [...]

-- https://github.com/BookStackApp/BookStack/issues/723#issuecomment-1110220775

I agree with that.

Resources

The packages published a lot of language resources. I'm currently questioning whether they should reside in the application's resources as I don't think there will be any changes to them.

Relations

I read through the comments in #185, #723 and #2405.

Closes #723, closes #2405.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3783 **Author:** [@axelrindle](https://github.com/axelrindle) **Created:** 10/14/2022 **Status:** ❌ Closed **Base:** `development` ← **Head:** `feature/backup` --- ### 📝 Commits (2) - [`336bd22`](https://github.com/BookStackApp/BookStack/commit/336bd2204614de3f20016e4eb4dc12e1a113ca26) Configure automated backups - [`6cb19cb`](https://github.com/BookStackApp/BookStack/commit/6cb19cb2376dc241a3c5e135210d30b8538b40c3) Include version file ### 📊 Changes **30 files changed** (+1331 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+10 -0) 📝 `.env.example.complete` (+3 -0) ➕ `app/Config/backup.php` (+269 -0) 📝 `app/Config/filesystems.php` (+6 -0) 📝 `composer.json` (+1 -0) 📝 `composer.lock` (+202 -1) ➕ `resources/lang/vendor/backup/ar/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/cs/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/da/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/de/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/en/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/es/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/fa/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/fi/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/fr/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/hi/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/id/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/it/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/ja/notifications.php` (+35 -0) ➕ `resources/lang/vendor/backup/nl/notifications.php` (+35 -0) _...and 10 more files_ </details> ### 📄 Description ### Description [spatie/laravel-backup](https://github.com/spatie/laravel-backup) is a package for automated backup creation. The default configuration includes the following data in a backup: - Complete database dump - `public/uploads` - `storage/uploads` - `.env` I incorporated the data [mentioned in the docs](https://www.bookstackapp.com/docs/admin/backup-restore/). This does not add any possibility to create backups from the UI. Backups can be created by running the following Artisan command: ```shell php artisan backup:run ``` If the user wishes he may create a database-only backup: ```shell php artisan backup:run --only-db ``` I like this package because it lets me create backups with ease and without having to deal with custom scripts. And I'm lazy `¯\_(ツ)_/¯` ### Points to discuss #### Configuration The package is highly configurable and I already changed some of the defaults, for example the following: https://github.com/axelrindle/BookStack/blob/336bd2204614de3f20016e4eb4dc12e1a113ca26/app/Config/backup.php#L119-L122 In my eyes the biggest point to discuss is: should there be anything else to configure via environment variables? I'd say **no** to keep the complexity of the config file small. #### Restore The package does not provide the possibility to restore backups which still leaves that up to the user. > I don't think it'd be worth maintaining such logic in the core project [...] > > -- <cite>https://github.com/BookStackApp/BookStack/issues/723#issuecomment-1110220775</cite> I agree with that. #### Resources The packages published a lot of language resources. I'm currently questioning whether they should reside in the application's resources as I don't think there will be any changes to them. ### Relations I read through the comments in #185, #723 and #2405. Closes #723, closes #2405. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:28:03 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6264