Exporting Hosted JSON importing to Self Hosted - Issues

I am testing a hosted solution for a second office. I wanted to replicate my data, so I exported the JSON from my hosted and imported in my self-hosted. Everything seemed to import properly except:

  1. No payments imported into self-hosted.
  2. 106 Expenses in Hosted shows 0 Expenses in Self-Hosted BUT
  3. Recurring Expenses in Self Hosted has 42 of my 106 Expenses from the hosted and none of the 3 recurring expenses from hosted.
    It seems the regular expenses from hosted got split into recurring expenses in self hosted.
    Is this a known bug? I deleted all the data in self-hosted and reimported with the same issue.
    ANy assistance here would be appreciated. thank you!


@david any thoughts?

Your web server could potentially be stopping the import script as a result of your PHP’s max_execution_time.
Could you try changing the max_execution_time directive in your php.in file.

Also have a look at your upload_max_filesize and post_max_size directives as the web server could be stopping the import as a result of reaching the maximum uploaded file size. But it probably isn’t this as the web server should’ve rejected the upload from the start if this was the case.

I’m not too sure why expenses were getting split, are you running the same version of Invoice Ninja? Maybe try uploading a CSV file instead of a JSON?

Also are there any logs in the self-hosted logs directory?

I changed the max execution time to 60, and will create a second test site and try another import.
I doubt its the file size as you said, it didn’t reject.
I would try CSV, but the only method I see to export is the single Export option which is only JSON. Can you point me to a way to export all data as CSV?

Alternately, I wonder if the hosted admins can just do a sql dump and send me the file?

I will look for the logs in the logs directory.

I have the ability to export as a CSV here, but it’s potentially blocked by the hosted variation.

You could ask, but I think they would most likely just send you a CSV. The hosted variation of IN probably has custom tables that aren’t used in the self-hosted version.

That’s Import… If you click Export, you only get a JSON file, no CSV.

Whoops! Sorry my bad, they might be able to generate you a CSV file or maybe you could convert it yourself.


Are there any errors in the logs at all? storage/logs/laravel.log?

There were no errors in the log.


I’ve added some fixes for the importer to catch some edge cases. Please test in the next release v5.3.36

@david I sure will. When do you estimate 5.3.36 will post?


in the next day i’ll tag another release :slight_smile:


New release has been tagged.

@david I upgraded to .36 and did a new export from the hosted and imported into self-host. Recurrent Expenses imported, but none of the Expenses imported now.

@david Also, no payments imported either.


Are there any messages in the logs now?

@david I will check the log when I get home, but I did get an email that said:
There was an error importing the company data, the error message was:
The Import failed due to missing data in the import file. Resource recurring_expenses not available.


I’ve tagged 5.3.37 with another for this, please advise after you have upgraded to the latest.

@david Unfortunately still no expenses imported, nor any payments. I’ll post the error once I get the email and data.

@david after a quick look at the data, it looks like the “expenses” imported into “recurring expenses” again.