Nova Spatie Backup: Keeps spinning / 422 error: "This disk is not configured as a backup disk."
Engineer. Maker. Open Source Fan. Backpacker
by Peter Thaleikis
Spatie's Laravel Components are surely known to most and are great helpers to build any kind of Laravel application or website. I've been using the Laravel Backup component on my projects. With my recent shift to Laravel Nova on my new project BiteSizedInsights.com, I've started to look at the related Nova component. It worked fine, once I got over some initial trouble.
Once completed installing Spatie Backups, I've run a artisan backup:run to see if it works: local backups worked as to expect and are considered "healthy":
As usual, I've continued to set up B2 as my cloud filesystem and backup solution. The setup of B2 as your Laravel backup system is easy and done in a few minutes.
After this, I've installed the Nova component for Laravel backups using composer: composer require spatie/nova-backup-tool and configured the tools as explained. While checking the Nova admin interface I've noticed that it isn't working as expected. The loading icons kept spinning without any data showing up:
After checking the Firefox browser console I've noticed an odd HTTP-422 request with this message:
The message contained an error message, which I've not seen on the admin-panel:
This disk is not configured as a backup disk.
After some research in the code, I've found out this error was caused by a small misconfiguration in the config/backup.php file:
Once I've set this to B2 the backup overview & creation worked as expected:
I'm solving & documenting random issues I encounter in the daily coder life. Besides this, I'm writing about business and my side-projects. If you are interested in either of them, subscribe to the newsletter below.
Did you like this article?
Besides tones of crap, the web also has lots interesting open-source libraries, actually innovative side-projects and awesome free knowledge. Once in a while, I share these awesome web-findings via email. If this sounds like something you are into, subscribe below: