PDA

View Full Version : Can you back up library?



ecaf
2008-12-28, 23:26
I have a HUGE library and scanning takes forever. I am going to re-build my Media Server and don't want to start form scratch. I don't see an way to back it up before I proceed.

funkstar
2008-12-29, 03:39
I think if you just copy the SqueezeCenter folders in "Program Files" and "Program data" then replace them when you are done that should over it.

This is assuming youa re on Windows, no idea where they are located on other OSs

Skunk
2008-12-29, 05:53
The folder locations are listed in the web interface settings page under the Information tab.

If you mean back up the library so you can reformat the HD, I'd consider getting an external drive or a second internal drive to serve as backup, in case original drive fails at some point.

4mula1
2008-12-29, 06:45
I think he has his music library backed up, but wants to know how to backup SqueezeCenter's files, in particular the database.

I can't be much help because I install from source on Solaris and (have to) use my own MySQL instance. I'm not sure of where things are on Windows (I'm assuming he's using Windows).

Skunk
2008-12-29, 07:19
I think he has his music library backed up, but wants to know how to backup SqueezeCenter's files, in particular the database.

I can't be much help because I install from source on Solaris and (have to) use my own MySQL instance. I'm not sure of where things are on Windows (I'm assuming he's using Windows).

They're listed in the web interface settings for me, but I'm using a nightly build.

If not, there is some info here http://wiki.slimdevices.com/index.php/SqueezeCenterDefaultLocations , but I didn't find any helpful threads with a site and Google search.

4mula1
2008-12-29, 07:48
To back up SqueezeCenter, in the web interface go to settings and SqueezeCenter Status. Everything in the Preferences Folder needs to be backed up. If you have playlists I'd back them up also.

As far as MySQL goes, search your hard drive for files ending in .frm, .myi, and .myd. These will be the database files for SqueezeCenter. You should have files like:



drwx------ 2 mysql mysql 1024 Dec 26 14:33 .
drwx------ 5 mysql mysql 512 Dec 21 19:03 ..
-rw-rw---- 1 mysql mysql 9130 Dec 26 14:33 albums.frm
-rw-rw---- 1 mysql mysql 8620 Dec 26 14:33 comments.frm
-rw-rw---- 1 mysql mysql 8636 Dec 26 14:33 contributor_album.frm
-rw-rw---- 1 mysql mysql 8820 Dec 26 14:33 contributors.frm
-rw-rw---- 1 mysql mysql 8636 Dec 26 14:33 contributor_track.frm
-rw-rw---- 1 mysql mysql 8592 Dec 15 15:16 dbix_migration.frm
-rw-rw---- 1 mysql mysql 129 Dec 15 15:46 dbix_migration.MYD
-rw-rw---- 1 mysql mysql 2048 Dec 15 15:46 dbix_migration.MYI
-rw-rw---- 1 mysql mysql 65 Mar 24 2008 db.opt
-rw-rw---- 1 mysql mysql 8770 Dec 26 14:33 genres.frm
-rw-rw---- 1 mysql mysql 8594 Dec 26 14:33 genre_track.frm
-rw-rw---- 1 mysql mysql 8592 Dec 15 15:46 metainformation.frm
-rw-rw---- 1 mysql mysql 8664 Dec 26 14:33 playlist_track.frm
-rw-rw---- 1 mysql mysql 8622 Dec 26 14:33 pluginversion.frm
-rw-rw---- 1 mysql mysql 8808 Dec 15 15:46 progress.frm
-rw-rw---- 1 mysql mysql 8732 Dec 15 15:46 rescans.frm
-rw-rw---- 1 mysql mysql 14042 Dec 26 14:33 tracks.frm
-rw-rw---- 1 mysql mysql 8814 Dec 15 15:46 tracks_persistent.frm
-rw-rw---- 1 mysql mysql 8652 Dec 26 14:33 unreadable_tracks.frm
-rw-rw---- 1 mysql mysql 8556 Dec 26 14:33 years.frm


When you restore your SqueezeCenter preference files and MySQL files the SqueezeCenter and MySQL services will need to be stopped.

If there are any other files that need to be backed up hopefully somebody else will point them out, but this should do it.

ecaf
2008-12-29, 07:50
that is what I was looking for!


To back up SqueezeCenter, in the web interface go to settings and SqueezeCenter Status. Everything in the Preferences Folder needs to be backed up. If you have playlists I'd back them up also.

As far as MySQL goes, search your hard drive for files ending in .frm, .myi, and .myd. These will be the database files for SqueezeCenter. You should have files like:



drwx------ 2 mysql mysql 1024 Dec 26 14:33 .
drwx------ 5 mysql mysql 512 Dec 21 19:03 ..
-rw-rw---- 1 mysql mysql 9130 Dec 26 14:33 albums.frm
-rw-rw---- 1 mysql mysql 8620 Dec 26 14:33 comments.frm
-rw-rw---- 1 mysql mysql 8636 Dec 26 14:33 contributor_album.frm
-rw-rw---- 1 mysql mysql 8820 Dec 26 14:33 contributors.frm
-rw-rw---- 1 mysql mysql 8636 Dec 26 14:33 contributor_track.frm
-rw-rw---- 1 mysql mysql 8592 Dec 15 15:16 dbix_migration.frm
-rw-rw---- 1 mysql mysql 129 Dec 15 15:46 dbix_migration.MYD
-rw-rw---- 1 mysql mysql 2048 Dec 15 15:46 dbix_migration.MYI
-rw-rw---- 1 mysql mysql 65 Mar 24 2008 db.opt
-rw-rw---- 1 mysql mysql 8770 Dec 26 14:33 genres.frm
-rw-rw---- 1 mysql mysql 8594 Dec 26 14:33 genre_track.frm
-rw-rw---- 1 mysql mysql 8592 Dec 15 15:46 metainformation.frm
-rw-rw---- 1 mysql mysql 8664 Dec 26 14:33 playlist_track.frm
-rw-rw---- 1 mysql mysql 8622 Dec 26 14:33 pluginversion.frm
-rw-rw---- 1 mysql mysql 8808 Dec 15 15:46 progress.frm
-rw-rw---- 1 mysql mysql 8732 Dec 15 15:46 rescans.frm
-rw-rw---- 1 mysql mysql 14042 Dec 26 14:33 tracks.frm
-rw-rw---- 1 mysql mysql 8814 Dec 15 15:46 tracks_persistent.frm
-rw-rw---- 1 mysql mysql 8652 Dec 26 14:33 unreadable_tracks.frm
-rw-rw---- 1 mysql mysql 8556 Dec 26 14:33 years.frm


When you restore your SqueezeCenter preference files and MySQL files the SqueezeCenter and MySQL services will need to be stopped.

If there are any other files that need to be backed up hopefully somebody else will point them out, but this should do it.

JJZolx
2008-12-29, 15:50
that is what I was looking for!

Not so fast. You won't actually have backed up the database. :) Those files are just the table definitions.

If you can find the MySQL data directory containing a file called ibdata1, back up the entire directory tree. ibdata1 is the file containing the data - probably much larger than all the others. You also need the ib_log<n> files and should see a directory called 'mysql' below this.

Make sure you stop SqueezeCenter and (more importantly) MySQL before copying this directory tree. This isn't the proper way to backup MySQL, but it should work.

Moonbase
2008-12-29, 20:09
Q1: Would a mysqldump be sufficient?

Q2: Maybe one should look into mysqlhotcopy (a Perl script) … and eventually include it into SC?