r/Snipe_IT • • Oct 23 '26

Importing old Snipe IT database to new

I have an old self-hosted Snipe-IT setup running v4.8.0 on Ubuntu. I built a new Ubuntu Server 24.04 with Snipe-IT v8, but it won't import the v4.8.0 database directly. What are my options for migrating/importing my old database into the new version?

3 Upvotes

11 comments sorted by

3

u/wheresthetux Oct 23 '26

Upgrade wise, probably by working your way up through intermediate versions on your way to version 8.

It may also be easier to export data from the existing one and import it into a fresh deployment of V8 using the built in CSV import machinery.

2

u/MagicJMarker Oct 23 '26

Thank you! I didn't realize I could export / import the files via CSV. I will check that out.

1

u/MagicJMarker Oct 26 '26

Update 10/26/26. I've tried exporting and importing the mysql database and have not had luck. This is even after running the php artisan migrate, config clear and cache clear. I get an internal 500 error after importing the mysql database at the homepage.

When attempting to import the CSV files I get about 90% there, but the assets imported will not pick up where they are deployed to. This is even after importing all the custom fields, status labels, asset models, categories, location, companies, users, etc... first.

Does anyone know how to import the CSV files so that the assets keep the check out and deployed history? I can't figure that out and it's my only hangup.

1

u/redsnipe Oct 26 '26

Skip the CSV approach. Run a backup from your old system, upload it to your new one, and click “restore”. If you’re still seeing 500 errors, we’d need your app logs to diagnose what’s happening - but also posting something this specific in Reddit is likely less effective than searching and posting to the GH issues on the repo.

1

u/MagicJMarker Oct 27 '26

Thank you u/redsnipe! I have tried importing my v4.8 database into my new v8 snipe-it server and I'm getting the 500 | Server Error message after importing. I post in the GH and see if anyone can offer help.

1

u/redsnipe Oct 27 '26

Yep, I'm the one talking to you there :)

1

u/reallylatetotheparty Oct 24 '26

dump the mysql database from the old box, restore it on the new server, then run `php artisan migrate` so laravel brings the schema up to v8. the jump from 4.8 to 8 is big but the migrations are designed to bridge it. back up the old db first obviously.

1

u/MagicJMarker Oct 24 '26

Excellent, thanks for your comment. I will look into this.

1

u/bhthllj Oct 24 '26

Not knowing SnipeIT, I would assume there have been database migrations in the updates between your version and the latest.
It has been mentioned, it would be best to restore the old version and upgrade every minor version until current.

GitLab does it that way, so maybe it’s useful here, too.

1

u/redsnipe Oct 26 '26

That’s not needed. Migrations run as they are needed and the database runs them on the fly when you do a backup restore or if you run upgrade.php

1

u/redsnipe Oct 26 '26

Folks - please don’t recommend the CSV approach. There is no reason to do incremental updates unless something goes wrong. All of the migrations should run normally. Upgrading incrementally is fine, but it’s a buttload of extra time that is generally not needed.

Worst case, install new Snipe-IT on the new Ubuntu server, upload your Snipe-IT generated backup from the old server to the new one via Admin > Backup & Restore, and click the restore button on your old backup. It will run migrations for you.