Skip to main content
Skip table of contents

Rebuilding a damaged RSK file

When an RSK file appears to be corrupt, and the original download was "raw", use the following method to rebuild a new RSK.  This method will not work with EasyParse (Mobile) files since they do not contain the deployment/channels headers as part of the downloads. 


If the file is not readable by Ruskin: "database disk image is malformed", recover it by simply extracting the download data directly into a new bin file.

Steps

  1. Copy broken RSK file to local hard disk.

  2. Run the command line binary extraction on the broken RSK:


    CODE
    sqlite3 somefile.rsk "SELECT quote(data) FROM downloads" | cut -d "'" -f2 | xxd -r -p >> somefile.bin
  3. Open the binary file in Ruskin.

  4. After the binary processes, close the resulting new RSK.

  5. Validate that the new RSK opens in Ruskin.

  6. Rename new RSK file appropriately if needed. 

For files with Header 0 if the data table has a corrupt page, use the SQLBrowser. (Otherwise, there will have to be manual creation of missing data such as channels or schedule.)

Steps

  1. Open the corrupt RSK in SQLBrowser.

  2. Export all but the data table to a SQL text file.

  3. Import the SQL text file into a new RSK.

  4. Open the new RSK in Ruskin.

  5. Upgrade the RSK in Ruskin.

  6. Close Ruskin if hung (the Thumbnail is repopulated with all the data).

  7. Re-open the RSK in SQLBrowser and removed all but the first entry from the thumbnail table.

  8. Re-open the RSK in Ruskin.  

If these steps do not work, you can try to validate the file:

CODE
sqlite3 somefile.rsk "PRAGMA integrity_check;"

You could also try to remove the errors by vacuuming the db:

CODE
sqlite3 somefile.rsk "VACUUM;"


The next step would be to attach to the db via the cli and attempt to dump it to a new file:

CODE
sqlite3 somefile.rsk
.mode insert
.output dump.sql
.dump
.exit


The result of this is an ascii SQL file that can be viewed and edited with standard tools like vi.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.