Skip to content

Install spatie/laravel-backup for automated & easy backups#3783

Closed
axelrindle wants to merge 2 commits intoBookStackApp:developmentfrom
axelrindle:feature/backup
Closed

Install spatie/laravel-backup for automated & easy backups#3783
axelrindle wants to merge 2 commits intoBookStackApp:developmentfrom
axelrindle:feature/backup

Conversation

@axelrindle
Copy link

@axelrindle axelrindle commented Oct 14, 2022

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:

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 [...]

-- #723 (comment)

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.

Making use of spatie/laravel-backup for this
@ssddanbrown
Copy link
Member

Thanks for offering this @axelrindle!

To be honest though, I was hoping for some discussion in regards to the options presented in my #723 comment, before diving into an implementation.
Even taking this approach of using the Spatie package, I reflect some concerns, such as the compatibility of support pattern. Additionally, the surface area of the library is quite large in terms of what it does, while it also introduces some system requirements. We could lock down any exposed options to reduce supported surface area, but then it becomes more viable to support our own logic instead of introducing additional dependencies.

@ssddanbrown
Copy link
Member

I'm going to go ahead and close this off in favour of exploring options as per my message above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Backup and Restore functionality Feature Request: Backup/Restore from settings page

2 participants