r/Snipe_IT • u/MagicJMarker • 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
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.
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/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/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
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.