Hi Snipe Community,
Just wondering if you could help me on a minor problem.
We've been using version 2 for almost a year but unfortunately the system crashed due to hardware failure. I do have a zip backup though, but it's a few months back. I have no choice but to do a fresh install on another machine.
What do you think is my best and easiest course of action?
a. ) restore the database with a different name and just edit the .env
or
b. ) import the backup into the current database
What are the implications of both approach? (both are installed using the install.sh method)
Sorry for the newbie question. :-) Still familiarizing on the system.
Thanks in advance.
My answers are based upon an hardware move from 3.6 to 3.6 but may be helpful.
After a complete new install, I did a sql import after creating the database. There is no restore feature within SnipeIT. Be sure to copy the public/uploads directory and storage/private_uploads because these are not included in the sql zip file.
James
From: tanguyngoy [mailto:[email protected]]
Sent: Monday, January 23, 2017 5:58 AM
To: snipe/snipe-it snipe-it@noreply.github.com
Cc: Subscribed subscribed@noreply.github.com
Subject: [snipe/snipe-it] Best restore option (#3226)
Hi Snipe Community,
Just wondering if you could help me on a minor problem.
We've been using version 2 for almost a year but unfortunately the system crashed due to hardware failure. I do have a zip backup though, but it's a few months back. I have no choice but to do a fresh install on another machine.
What do you think is my best and easiest course of action?
a. ) restore the database with a different name and just edit the .env
or
b. ) import the backup into the current database
What are the implications of both approach? (both are installed using the install.sh method)
Sorry for the newbie question. :-) Still familiarizing on the system.
Thanks in advance.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/snipe/snipe-it/issues/3226, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATocGdwd4wGajX3CAGzsB0moEmy2tm81ks5rVIekgaJpZM4Lq592.
Thanks @jmathias59!
But I'm afraid I can't copy those folders back because it's the disk that crashed. What's in those folders anyway? If I remember it right we didn't upload any significant files (except for the logo). Would there be errors after import even if those folders are empty?
Thanks again.
I found that the logo would not load, even if I uploaded a new logo, when I did an import but did not move the two directories. Must be something in the sql database. We had a logo as well as images of all our asset models so restoring the images was important. I did a complete re-install, moved the directories, than imported the sql.zip file.
Anyway to mount the hard drive in another system?
James
From: tanguyngoy [mailto:[email protected]]
Sent: Monday, January 23, 2017 8:26 AM
To: snipe/snipe-it snipe-it@noreply.github.com
Cc: Mathias, James jmathias@wlu.edu; Mention mention@noreply.github.com
Subject: Re: [snipe/snipe-it] Best restore option (#3226)
Thanks @jmathias59https://github.com/jmathias59!
But I'm afraid I can't copy those folders back because it's the disk that crashed. What's in those folders anyway? If I remember it right we didn't upload any significant files (except for the logo). Would there be errors after import even if those folders are empty?
Thanks again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/snipe/snipe-it/issues/3226#issuecomment-274487201, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATocGSjuR_dyJh5qR4N5e2nm9g22-ITmks5rVKqEgaJpZM4Lq592.
Unfortunately the data is unrecoverable, not to mention it's in RAID 5. Do you think we can still salvage any data left in the zip backup without retyping everything?
The zip backup, once extracted, is a single file designed for import into MySQL. After import, everything should be restored with the exception on the images/logo. SnipeIT support might be able to assist with the modification of sql files to correct the missing logo file.
BTW – is this install Linux or Windows?
James
From: tanguyngoy [mailto:[email protected]]
Sent: Monday, January 23, 2017 11:41 AM
To: snipe/snipe-it snipe-it@noreply.github.com
Cc: Mathias, James jmathias@wlu.edu; Mention mention@noreply.github.com
Subject: Re: [snipe/snipe-it] Best restore option (#3226)
Unfortunately the data is unrecoverable, not to mention it's in RAID 5. Do you think we can still salvage any data left in the zip backup without retyping everything?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/snipe/snipe-it/issues/3226#issuecomment-274541418, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATocGUHDMjLTuWOpyPXInCbElQ_nNgBrks5rVNgegaJpZM4Lq592.
The previous installation is on CentOS 7, now it's on Ubuntu 16.04.
Aside from the logo, is there any other files that could affect the migration? We didn't upload asset images before and I think we could do without the logo for now. One of our top priorities is the asset movement history.
Only if you uploaded any license files. V3 backup includes uploaded files. IIRC, so hopefully next time this happens, you'll have everything. You should probably also set up the cron to automate the backups.
Thanks, @snipe!
We did input licenses and assigned them to users accordingly, but when you say license 'files' do you mean images, like jpg, or the information itself? When I browsed the private_uploads folder I do see assetmodels, assets,imports, licenses, signatures and users folders inside. Correct me if I'm wrong, but my hunch is that the system won't run even if I restore the old database because references to these folders were missing.
I mean uploaded files.
When I browsed the private_uploads folder I do see assetmodels, assets,imports, licenses, signatures and users folders inside.
On the old system, or the new system?
Correct me if I'm wrong, but my hunch is that the system won't run even if I restore the old database because references to these folders were missing.
It should run fine, but if you're using an older database (v2), you'll want to make sure you walk through the upgrade guide to make sure everything is where it needs to be.
On the new system, I mean.
I've read the guide, but I think it tackles more about the move from v2 to v3, assuming all files and references are intact. Unfortunately for me, all I have is the single .sql file from the zip backup. That is why I'm hesitant to restore the database file.
By the way, is the Import option in the GUI a viable option? I guess that won't include the history though.
If you installed v3 from scratch, you should have the necessary directories already. Just import your SQL, and then run migrations.
Oh, I see...
Would that be step #7 on the guide?
Yep
Alright. Will try today (fingers-crossed) :-)
Thanks!
No problem. If you get stuck, just let us know. As long as you have your database dump from the old install, you'll be fine. Upgrading the database is handled through migrations, which means you can't really break it too badly.
Whew! That went well!
Thanks for all the help...
Great!
@snipe Could you tell me, how can I restore images in backup.zip to mysql? I restored the records but without images. I backup data via clicking Generate Backup icon on Backups page. I put up snipeit by snipeit docker and mysql docker, the snipeit version is v3.6.2, the mysql version is 5.6.
Two directories need to be manually copied: public/uploads and storage/private_uploads. These are not included in the sql zip file.
From: DawnTan0321 [mailto:[email protected]]
Sent: Monday, March 06, 2017 3:14 AM
To: snipe/snipe-it snipe-it@noreply.github.com
Cc: Mathias, James jmathias@wlu.edu; Mention mention@noreply.github.com
Subject: Re: [snipe/snipe-it] Best restore option (#3226)
@snipehttps://github.com/snipe Could you tell me, how can I restore images in backup.zip to mysql? I restored the records but without images. I backup data via clicking Generate Backup icon on Backups page.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/snipe/snipe-it/issues/3226#issuecomment-284329096, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATocGc4EwLafsFSyqaJdriK4QyoFJkgBks5ri8A1gaJpZM4Lq592.
It works! Thanks very much!
My steps:
Thanks very much!
Most helpful comment
Two directories need to be manually copied: public/uploads and storage/private_uploads. These are not included in the sql zip file.
From: DawnTan0321 [mailto:[email protected]]
Sent: Monday, March 06, 2017 3:14 AM
To: snipe/snipe-it snipe-it@noreply.github.com
Cc: Mathias, James jmathias@wlu.edu; Mention mention@noreply.github.com
Subject: Re: [snipe/snipe-it] Best restore option (#3226)
@snipehttps://github.com/snipe Could you tell me, how can I restore images in backup.zip to mysql? I restored the records but without images. I backup data via clicking Generate Backup icon on Backups page.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/snipe/snipe-it/issues/3226#issuecomment-284329096, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATocGc4EwLafsFSyqaJdriK4QyoFJkgBks5ri8A1gaJpZM4Lq592.