Jump to content


Photo

How to Restore Ubuntu Server Settings

linux ubuntu restore backup

  • Please log in to reply
11 replies to this topic

#1 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 09 September 2019 - 02:54 PM

Following the information from this link <https://github.com/M...iki/wiki/Backup> I am running into either some issues or questions.

 

I backed up the following folders from my old Emby server.

config

data

metadata

plugins

 

Following the guide I installed on the new server and copied the files in the same locations </var/lib/emby/...>

 

  • /ProgramData/config
  • /ProgramData/plugins
  • /ProgramData/data/collections
  • /ProgramData/data/displaypreferences.db
  • /ProgramData/data/users.db
  • /ProgramData/metadata
here is the command I used
sudo cp –a /home/<login username>/config/. /var/lib/emby/config
 
I had to use 
 
sudo chown –R emby:emby /folder name
sudo chmod –R 755 /folder name
 
to make sure some of the folders had the permissions needed as they were showing the local user

 

I start the server and my users I had created are not there, nor are any of my libraries

 

Going through the settings, some of the information appears to be in place.

 

Did I miss something, do something wrong?

 


#2 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 09 September 2019 - 03:16 PM

Update, noticed /data/displaypreferenences.db and /data/user.db either hadn't copied over or didnt update the rights or owner so I copied them over and updated.

 

Now the server wont even start.



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146562 posts
  • Local time: 08:02 PM

Posted 10 September 2019 - 01:29 AM

Update, noticed /data/displaypreferenences.db and /data/user.db either hadn't copied over or didnt update the rights or owner so I copied them over and updated.

 

Now the server wont even start.

 

Hi, is any server log generated?



#4 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 10 September 2019 - 10:41 AM

All log files are attached.



#5 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 10 September 2019 - 10:42 AM

Now they are attached.

Attached Files



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146562 posts
  • Local time: 08:02 PM

Posted 02 October 2019 - 02:16 PM

@Kayser-Sosa, apologies for the delayed response, but copying raw .db files is not always recommended. did you just end up starting fresh?



#7 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 02 October 2019 - 03:17 PM

Yeah, I just started from scratch.  I was trying to follow the manual restore instructions and did not have any luck.  Do you think you could go over them a bit more?

 

 

My understanding is as follows from the manual restore instructions.

 

Backup the following folders and files after the server instance is shutdown

  • /ProgramData/config
  • /ProgramData/plugins
  • /ProgramData/data/collections
  • /ProgramData/data/playlists
  • /ProgramData/data/displaypreferences.db
  • /ProgramData/data/userdata_v2.db (if present)
  • /ProgramData/data/users.db

 

Install Emby on the new server but when the wizard launches, do not complete it, just shutdown the server.

Copy all the files listed above to the same location on the new server.

Launch the new server and sign in and setup library paths.

Allow a scan to complete.

Using DB Browser, open the old library.db file, attached the new library.db file and then run REPLACE INTO NewDB.userdatas SELECT * FROM userdatas

 

 

Did all of this and didnt have any luck.  Nothing was restored.


Edited by Kayser-Sosa, 02 October 2019 - 03:29 PM.


#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146562 posts
  • Local time: 08:02 PM

Posted 03 October 2019 - 02:58 PM

Yeah, I just started from scratch.  I was trying to follow the manual restore instructions and did not have any luck.  Do you think you could go over them a bit more?

 

 

My understanding is as follows from the manual restore instructions.

 

Backup the following folders and files after the server instance is shutdown

  • /ProgramData/config
  • /ProgramData/plugins
  • /ProgramData/data/collections
  • /ProgramData/data/playlists
  • /ProgramData/data/displaypreferences.db
  • /ProgramData/data/userdata_v2.db (if present)
  • /ProgramData/data/users.db

 

Install Emby on the new server but when the wizard launches, do not complete it, just shutdown the server.

Copy all the files listed above to the same location on the new server.

Launch the new server and sign in and setup library paths.

Allow a scan to complete.

Using DB Browser, open the old library.db file, attached the new library.db file and then run REPLACE INTO NewDB.userdatas SELECT * FROM userdatas

 

 

Did all of this and didnt have any luck.  Nothing was restored.

 

Sure, what question do you have?



#9 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 07 October 2019 - 11:38 AM

@Happy2Play From my understanding above, is there something I missed or did out of order?



#10 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 17177 posts
  • Local time: 05:02 PM
  • LocationWashington State

Posted 11 October 2019 - 07:16 PM

Technically you should be able to move/copy the entire programdata to the new machine/install.  But you are dependant on media/library paths remaining the same.

 

I know I moved my install from my C drive to my Y drive without any issues.

 

 

@Happy2Play From my understanding above, is there something I missed or did out of order?

 

I haven't tested this manually process in awhile since the plugin does this.  But depending on how old your installation is there can be database issues as a new install will have fewer userdata columns in a new database.



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146562 posts
  • Local time: 08:02 PM

Posted 18 October 2019 - 10:35 PM

Yea it could have been related to the age of the database files, age meaning how long it has been since they were originally created.



#12 Kayser-Sosa OFFLINE  

Kayser-Sosa

    Member

  • Members
  • 28 posts
  • Local time: 08:02 PM
  • LocationMidwest

Posted 19 October 2019 - 08:57 AM

The original was built on an Ubuntu 16.04 virtual server. I had upgraded the OS to 18. I'm sure that may have played a part to.





Also tagged with one or more of these keywords: linux, ubuntu, restore, backup

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users