How to Solve: Nova Spatie 422 error "This disk is not configured as a backup disk"

How to Solve: Nova Spatie 422 error "This disk is not configured as a backup disk"

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 Spatie' Laravel Backup component on my projects. With my recent shift to Laravel Nova on my new project, I've started to look at the related Nova component. It worked fine, once I got over some initial trouble.

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 Spatie' Laravel Backup component on my projects. With my recent shift to Laravel Nova on my new project, 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:runto 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-tooland 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 my newsletter!

laravel-nova laravel-framework laravel-tips-and-tricks error-handling coding programming computers error-messages-in-laravel

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Coding 101: Programming Language Building Blocks

This article will introduce the concepts and topics common to all programming languages, that beginners and experts must know!

Laravel 8 Custom Validation Error Messages Example

Laravel 8 custom validation rules and error messages. In this tutorial, we will show you how to add custom validation rules and display custom validation error messages in laravel 8 app. If you want to change the default validation rulesRead More Laravel 8 Custom Validation Error Messages Tutorial

10 Laravel Quick Tips

Spread the loveTip 1. Controllers Having Single Action In some situations you need a single action in a controller, if this is the case in Laravel you can achieve it by __invoke() method. Routes: Artisan command to generate this controller:…Read More→

How to Structure Your Programming Code

I remember my first fumble with basic on my ZX Spectrum computer back in the 1980s, ploughing through pages of basic commands and example code without any real idea of how I could write programs myself

Python Programming Tips For Beginners.

Python Tricks to become a better Programmer. In this article, we shall be discussing tips required to become a beginner to advance level python programmer which I myself have been trying to implement and follow for several years.