Restore not working on self-hosted installation

My old Self-hosted installation was previously working fine, but has been slowly failing through updates. It’s also in a subfolder, so that could be what is causing my grief. So I decided to create a new installation of Invoice Ninja in the root level of a different domain using Softaculous. So far so good.

Note: All of these following steps are using the web interface. I’m on shared hosting through Hostinger.

I exported a JSON file from my old installation (v5.12.5-c174). I tried to upload it to my new installation through the Restore feature (v5.12.8). The upload gets to 99% and hangs for a few seconds before “Processing” and the progress bar disappear. I wait a minute and check my data. Nothing is there. Zero products, zero invoices, zero clients, zero of anything.

I still had my free Hosted account (doesn’t show what version, just v) so I logged in, upgraded to the Pro trial, and purged all of the old data. I then set to Restore the same JSON file that didn’t work in my new Self-hosted installation. It restored perfectly on the Hosted account. I can see all of the invoices, clients, products, quotes, and payments on the Hosted account. Wonderful! So why won’t it work on my Self-hosted account?

At this point, I figured I would try restoring through the desktop app. (I’m on MacOS Sonoma 14.7.6). On the first try, one of the errors indicated that the post data was too large, so I upped the PHP settings to 1024M for both the postMaxSize and uploadMaxFilesize. But I also received this message, which I have no clue what it means.

Headers: {connection: keep-alive, cache-control: no-cache, private, date: Fri, 25 Jul 2025 21:01:21 GMT, vary: Accept-Encoding, content-encoding: gzip, panel: hpanel, x-robots-tag: noindex, nofollow, content-type: application/json; charset=utf-8, server: hcdn, platform: hostinger, x-powered-by: PHP/8.3.16, alt-svc: h3=“:443”; ma=86400, content-length: 68, p3p: policyref="/w3c/p3p.xml", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT", x-hcdn-request-id: 1bda08ce3486e670fab253a5b3525108-phx-edge5, content-security-policy: upgrade-insecure-requests}}

After adjusting the PHP settings, I uploading a second time and received this error:

FormatException: Unexpected character (at character 1)
ok{“message”:“Processing”,“success”:true}
^

Again, no records show up in my new Invoice Ninja installation through the app or through the web interface.

I wanted to see what would happen if I used an exported JSON file from the Hosted account and imported that into my new Self-Hosted account. The file from the Hosted account yields the same nothing results as my JSON file from my other Self-hosted account.

Here’s the partial dump from the laravel log, which seems to be a rince-and-repeat every time I try to restore the file.

Any insights would be greatly apprecaited.

#84 {main}
[2025-07-25 22:05:54] production.INFO: Attempt to read property “email” on true
[2025-07-25 22:05:54] production.INFO: #0 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /home/u124509588/domains/sebes.us/public_html/app/Jobs/Company/CompanyImport.php(1431): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap{closure}()
#2 /home/u124509588/domains/sebes.us/public_html/app/Jobs/Company/CompanyImport.php(700): App\Jobs\Company\CompanyImport->import_users()
#3 /home/u124509588/domains/sebes.us/public_html/app/Jobs/Company/CompanyImport.php(351): App\Jobs\Company\CompanyImport->importData()
#4 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Jobs\Company\CompanyImport->handle()
#5 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#6 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure()
#7 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#8 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(696): Illuminate\Container\BoundMethod::call()
#9 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(126): Illuminate\Container\Container->call()
#10 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Bus\Dispatcher->Illuminate\Bus{closure}()
#11 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#12 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(130): Illuminate\Pipeline\Pipeline->then()
#13 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\Bus\Dispatcher->dispatchNow()
#14 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue{closure}()
#15 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#16 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(121): Illuminate\Pipeline\Pipeline->then()
#17 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(69): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware()
#18 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\Queue\CallQueuedHandler->call()
#19 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(76): Illuminate\Queue\Jobs\Job->fire()
#20 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(56): Illuminate\Queue\SyncQueue->executeJob()
#21 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(244): Illuminate\Queue\SyncQueue->push()
#22 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(228): Illuminate\Bus\Dispatcher->pushCommandToQueue()
#23 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(77): Illuminate\Bus\Dispatcher->dispatchToQueue()
#24 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php(222): Illuminate\Bus\Dispatcher->dispatch()
#25 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php(19): Illuminate\Foundation\Bus\PendingDispatch->__destruct()
#26 /home/u124509588/domains/sebes.us/public_html/app/Http/Controllers/ImportJsonController.php(103): App\Jobs\Company\CompanyImport::dispatch()
#27 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\ImportJsonController->import()
#28 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(44): Illuminate\Routing\Controller->callAction()
#29 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(21): Illuminate\Routing\ControllerDispatcher->dispatch()
#30 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(18): Sentry\Laravel\Tracing\Routing\TracingControllerDispatcherTracing->Sentry\Laravel\Tracing\Routing{closure}()
#31 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(20): Sentry\Laravel\Tracing\Routing\TracingRoutingDispatcher->wrapRouteDispatch()
#32 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(266): Sentry\Laravel\Tracing\Routing\TracingControllerDispatcherTracing->dispatch()
#33 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\Route->runController()
#34 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(808): Illuminate\Routing\Route->run()
#35 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Routing\Router->Illuminate\Routing{closure}()
#36 /home/u124509588/domains/sebes.us/public_html/app/Http/Middleware/ValidJson.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#37 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\Http\Middleware\ValidJson->handle()
#38 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(124): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#39 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(89): Illuminate\Routing\Middleware\ThrottleRequests->handleRequestUsingNamedLimiter()
#40 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Routing\Middleware\ThrottleRequests->handle()
#41 /home/u124509588/domains/sebes.us/public_html/app/Http/Middleware/QueryLogging.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#42 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\Http\Middleware\QueryLogging->handle()
#43 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#44 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#45 /home/u124509588/domains/sebes.us/public_html/app/Http/Middleware/Locale.php(95): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#46 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\Http\Middleware\Locale->handle()
#47 /home/u124509588/domains/sebes.us/public_html/app/Http/Middleware/TokenAuth.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#48 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\Http\Middleware\TokenAuth->handle()
#49 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#50 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->then()
#51 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\Routing\Router->runRouteWithinStack()
#52 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\Routing\Router->runRoute()
#53 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\Routing\Router->dispatchToRoute()
#54 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\Routing\Router->dispatch()
#55 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}()
#56 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#57 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\Laravel\Http\FlushEventsMiddleware->handle()
#58 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#59 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\Laravel\Http\SetRequestIpMiddleware->handle()
#60 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#61 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\Laravel\Http\SetRequestMiddleware->handle()
#62 /home/u124509588/domains/sebes.us/public_html/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#63 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Livewire\Features\SupportDisablingBackButtonCache\DisableBackButtonCacheMiddleware->handle()
#64 /home/u124509588/domains/sebes.us/public_html/app/Http/Middleware/Cors.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#65 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\Http\Middleware\Cors->handle()
#66 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#67 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Http\Middleware\TrustProxies->handle()
#68 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#69 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#70 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#71 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#72 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#73 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#74 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#75 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Http\Middleware\ValidatePostSize->handle()
#76 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#77 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#78 /home/u124509588/domains/sebes.us/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(79): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#79 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\Laravel\Tracing\Middleware->handle()
#80 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#81 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Pipeline\Pipeline->then()
#82 /home/u124509588/domains/sebes.us/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#83 /home/u124509588/domains/sebes.us/public_html/public/index.php(56): Illuminate\Foundation\Http\Kernel->handle()
#84 {main}

Hi,

If you’re transferring between two selfhost installations we recommend using mysqldump. You’ll also want to copy over the .env file.

Thanks for the reply. I’ll look into mysqldump.

I was able to go from Self-Hosted to and restore to Hosted. It’s working well. Is it feasible to go from the working Hosted back to my new Self-Hosted installation? When I try, nothing seems to restore. I’m noticing that the mysql database is 293MB, which is more than you can upload from within mysql. Depite being in the InvoiceNinja environment, could that be the problem? I’m seeing what appears to be the correct column names in mysql. Perhaps the large database size is crapping out the upload?

Thanks.

I suggest following up in a discussion on GitHub

Restore to Hosted worked perfectly, but moving back to Self-Hosted fails—likely due to my 293 MB MySQL DB exceeding web upload limits.

Are you using the latest version of the app? There are recent changes related to this.

Until I figure out how to get around the file size limitation on my hosting, I’m sticking with the Hosted Invoice Ninja. Not a high priority at this point, but I’ll get around to it. Thanks much for the help though.

1 Like