PDA

View Full Version : Disk crash, partial backup available, how to determine delta?



bakker_be
2015-12-21, 02:31
Hi all,

last weekend the disk containing my music collection decided to stop functioning. I have a partial backup (90%) and I'd like to know if there's a way to compare the contents of this backup to the LMS library in a more or less "automatic" way. Given that there were around 120K songs, doing it manually would be a very lengthy job :(

DJanGo
2015-12-21, 02:36
Hi all,

last weekend the disk containing my music collection decided to stop functioning. I have a partial backup (90%) and I'd like to know if there's a way to compare the contents of this backup to the LMS library in a more or less "automatic" way. Given that there were around 120K songs, doing it manually would be a very lengthy job :(
for which OS?

Something like

sqlite3 /var/lib/squeezeboxserver/cache/library.db "select url from tracks" |sed 's/%20/ /g' |sed 's\file://\\g'>testfile.txt
and a simple for do next with a if exist file than
should do the job under *tux.

bakker_be
2015-12-21, 04:40
for which OS?

Something like

sqlite3 /var/lib/squeezeboxserver/cache/library.db "select url from tracks" |sed 's/%20/ /g' |sed 's\file://\\g'>testfile.txt
and a simple for do next with a if exist file than
should do the job under *tux.

I'm working on Windows actually.

DJanGo
2015-12-21, 10:38
I'm working on Windows actually.

hopefully your are not a beginner in the "black & white world (command)" of Windows:D

ok you need sqlite3 the commandline executable - google for that and put it somewhere in a separate folder.

you need a copy or the original library.db copy that to the folder where you put sqlite3.
run a cmd shell

sqlite3 library.db "select url from tracks">myfiles.txt
Now you should have a new file myfiles.txt - since thats a onces only job - you open that file with notepad.
Search and replace

%20 against " " (space)
/ against \
File:// against "" (nothing) or the path where your windows System finds these files
if there are another %00-%FF - you have to find what chars these represent and replace these also
if your done save that file

now you need some cmd file.

echo "@echo on">my_batch.cmd
notepad my_batch.cmd
this file should look like:

@echo on
for /f "delims="" %%a in ('type myfiles.txt') do
if not exist "%%a" echo "%%a">>lost_files.txt
next


save that file and run it. If its done you should have a new file named lost_files.txt and that should list all the files that lms know and not included in your Backup.

bakker_be
2015-12-21, 10:54
hopefully your are not a beginner in the "black & white world (command)" of Windows:D

ok you need sqlite3 the commandline executable - google for that and put it somewhere in a separate folder.

you need a copy or the original library.db copy that to the folder where you put sqlite3.
run a cmd shell

sqlite3 library.db "select url from tracks">myfiles.txt
Now you should have a new file myfiles.txt - since thats a onces only job - you open that file with notepad.
Search and replace

%20 against " " (space)
/ against \
File:// against "" (nothing) or the path where your windows System finds these files
if there are another %00-%FF - you have to find what chars these represent and replace these also
if your done save that file

now you need some cmd file.

echo "@echo on">my_batch.cmd
notepad my_batch.cmd
this file should look like:

@echo on
for /f "delims="" %%a in ('type myfiles.txt') do
if not exist "%%a" echo "%%a">>lost_files.txt
next


save that file and run it. If its done you should have a new file named lost_files.txt and that should list all the files that lms know and not included in your Backup.

THis is simply brilliant. Never thought of doing it this way. Thanks a lot. This will make it a lot easier to go back to the boxes of CD's and re-rip the missing ones or to the stores and re-download :)

stroom
2015-12-22, 10:13
Hi all,

last weekend the disk containing my music collection decided to stop functioning. I have a partial backup (90%) and I'd like to know if there's a way to compare the contents of this backup to the LMS library in a more or less "automatic" way. Given that there were around 120K songs, doing it manually would be a very lengthy job :(

Syncbackfree

bakker_be
2015-12-24, 12:25
Syncbackfree
I'm sorry, but I fail to see how Syncback in either it's free or paid version will help me determine what I've lost in my disk crash, based on a physical, partial, backup and what's present in the LMS database ...

stroom
2015-12-24, 13:21
I'm sorry, but I fail to see how Syncback in either it's free or paid version will help me determine what I've lost in my disk crash, based on a physical, partial, backup and what's present in the LMS database ...

Sorry, misunderstood your question.

bakker_be
2015-12-25, 04:42
Sorry, misunderstood your question.
No problem, just wanted to make sure I didn't misunderstand your answer :p