Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    May 2007
    Posts
    142

    How to make a fresh start with Trackstat?

    I am a Trackstat user. I recently restructured my library of FLAC files, and the complexity of the restructuring has meant that neither restoring my latest (pre-restructuring) scheduled backup of Trackstat nor the option to "Find alternative files" is successful in salvaging all of my Trackstat data. Both those efforts have probably just made things worse. So, I'd like to make an absolutely fresh start with Trackstat, as if I was installing and using it for the very first time.

    I'd appreciate any help you can give in answering these questions:

    1. What procedure can I use to achieve an absolutely fresh start with Trackstat? For example, could I achieve this by doing something as "simple" as deleting the persist.db file and other files? If so, where would I find such files?

    I have tried "Delete unused statistic" and "Remove all data" followed by a rescan, but thanks to the persist.db (I guess) the deleted, incomplete data come right back and subsequently entered ratings data don't "stick." I have also uninstalled and reinstalled Trackstat, but that hasn't worked either, maybe because a newly installed Trackstat "finds" and uses old files that weren't uninstalled. Thus my desire to make a fresh start.

    2. Once I have achieved a fresh start with Trackstat I'll of course want to do scheduled backups as I did in the past.

    I'll have no problems browsing and selecting the directory where I'll have read/write privileges. But although I've successfully done scheduled backups in the past, I can't remember how to create (?) the file that will store the initial backup of data. I know that the scheduled backup files are .xml files, but surely I can't just use, say, Notepad to create a blank file with a .xml extension (e.g., tsbackup.xml) and expect Trackstat to write the initial backup to that file, can I?

    I don't remember creating such a file in the past, so I'm wondering if Trackstat automatically creates such a file on its own the first time a scheduled backup occurs.

    Thanks in advance for your help. Stay safe...
    Last edited by radish112; 2021-02-04 at 05:44.

  2. #2
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,150
    Quote Originally Posted by radish112 View Post
    I recently restructured my library of FLAC files, and the complexity of the restructuring has meant that neither restoring my latest (pre-restructuring) scheduled backup of Trackstat nor the option to "Find alternative files" is successful in salvaging all of my Trackstat data.
    You can always edit trackstat's backup xml files and manually search/ replace paths

    1. What procedure can I use to achieve an absolutely fresh start with Trackstat? For example, could I achieve this by doing something as "simple" as deleting the persist.db file and other files? If so, where would I find such files?
    First of all, it's important to understand that ratings / playcount are LMS functionalities. trackstat synchronizes it's data with LMS.
    Deleting persist.db will delete LMS' ratings / playcount and trackstat data.
    You could delete trackstat's table from persist.db, keeping LMS' data. However, if you move your audio files, LMS will lose it's ratings / playcount in any case.

    the deleted, incomplete data come right back and subsequently entered ratings data don't "stick."
    not sure what you mean by "don't stick". If you set a rating, what happens?

    I'll have no problems browsing and selecting the directory where I'll have read/write privileges. But although I've successfully done scheduled backups in the past, I can't remember how to create (?) the file that will store the initial backup of data.
    You don't need to create any files, just configure backup in trackstat's settings. Test by doing a "Backup to file" (to the same folder as the scheduled backup)
    Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  3. #3
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,229
    Quote Originally Posted by radish112 View Post
    1. What procedure can I use to achieve an absolutely fresh start with Trackstat? For example, could I achieve this by doing something as "simple" as deleting the persist.db file and other files? If so, where would I find such files?
    I think the only easy way to do it is to shutdown LMS and delete all database files. In theory it might be enough to delete persist.db but Iĺm not sure all LMS and plugin tables are recreated properly if only persist.db is deleted so Iĺd suggest deleting all db files. You can try only deleting persist.db but be prepared to potentially get strange issues.

    The issue you are seeing is because standard LMS tables also contain the data so TrackStat will recreate its data based on standard LMS tables on next startup or rescan. I have to admit that the clear functions in TrackStat should really clear LMS data also but unfortunately I didnĺt think about that when implementing these functions. If you perform a full rescan in LMS after clearing the data with TrackStat I think you should get rid of the data related to files that no longer exist, but the old data will still be there for files that exist.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  4. #4
    Senior Member
    Join Date
    May 2007
    Posts
    142
    Roland0 and Erland,

    Many thanks to you both for your helpful replies.

    Although I may later find out that my current optimism isn't warranted, I seem to have achieved what I wanted, which was a "fresh start."

    I believe that things were just as you, Erland, suggested. After I did both a "Delete unused statistics" and "Remove all data" one right after the other, I then immediately did a manual backup, and the backup file was just an "empty" .xml file ready to receive data.

    Then I immediately did a "clear library and rescan everything" as a test. I followed this by doing another manual backup, and the .xml file was full of data rather than the empty shell the previous backup produced. I believe this was a demonstration of what you predicted in that what I'd done was to "get rid of the data related to files that no longer exist, but the old data will still be there for files that exist."

    In any event, I've begun happily listening to music and making my ratings anew. A quick creation and test of an SQL Playlist showed that I can (for example) play a random set of tunes I have rated 5* since my fresh start.

    I was content to start from scratch again, and it looks like that's what I've accomplished. Salvaging the old data would have been good (and the ratings in the small number of files that didn't get moved during my restructuring HAVE been preserved), but I'm OK with the way things are.

    I've done both scheduled backups and a manual backup, and they seemed to go ok. The relationship between the two still seems a little confusing to me, but I intend to continue with scheduled backups so if I ever have to "restore" from file" I can just point to the most recent scheduled backup file as the one from which the restoring will be done.

    Thanks again to you both. Doing the ratings again means I'm listening to more music lately...that's the whole point, isn't it?

    Steve

  5. #5
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,229
    Quote Originally Posted by radish112 View Post

    I've done both scheduled backups and a manual backup, and they seemed to go ok. The relationship between the two still seems a little confusing to me, but I intend to continue with scheduled backups so if I ever have to "restore" from file" I can just point to the most recent scheduled backup file as the one from which the restoring will be done.
    Scheduled and manual backup does the same thing. If you have setup scheduled backups the primary use case of a manual backup would be to do one just before a reinstall if you want to be sure to not loose data since last scheduled backup. Also please note that there are no automatic deletion of old backup files, so you may want to delete older backups to avoid that they eventually take up a lot of disc space.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •