NextPVR Forums

Full Version: New DB/cleaned DB for rebuilt system
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way of exporting tuning parameters/channel IDs, tuners etc, for say creating a new DB? Like the recordings-backup.xml

Or a way of taking an existing DB, removing the EPG/Recordings/playback details so that you don't have to rescan, assign an dredo all your channels?
Sorry, there is nothing built in for doing this. You could probably just fire up a SQLite tool and empty the PLAYBACK_POSITION, SCHEDULED_RECORDING, RECURRING_RECORDING, and EPG_EVENT tables though.
I assumes as much. Was good to get a list of tables though...

Thanks.
On the subject of cleaning the db/rebuilding a system:
I've had to replace my HDD's (recording storage only, not the npvr application, so SCHEDULED_RECORDING and EPG_EVENTS, tuners, channels.. are all ok)
and now my migrated recordings are all showing the wrong air date - they've had a timezone adjustment that they didn't need!

Here's what I did:
1. "Export Recordings", to create recording-backup.xml
2. Find/replace to change the path of each recording to reference the new location
Eg: replace "E:\Media\New Recordings\" with "G:\Recorded TV\"

ORIGINAL:
<recording>
<oid>7406</oid>
<name>Fringe</name>
<channel>TV2</channel>
<filename>E:\Media\New Recordings\Fringe\Fringe_20120719_22352335.ts</filename>
<status>READY</status>
<startTime>2012-07-19T10:35:00.0000000Z</startTime>
<endTime>2012-07-19T11:35:00.0000000Z</endTime>
<Event>
<OID>1746520</OID>
<Title>Fringe</Title>
<SubTitle></SubTitle>
<Description>While Peter and Olivia investigate murders involving an inexplicable toxin, Astrid and her Other Side counterpart meet for the first time.</Description>
<ChannelOID>6898</ChannelOID>
<StartTime>2012-07-19T10:35:00.0000000Z</StartTime>
<EndTime>2012-07-19T11:35:00.0000000Z</EndTime>
</Event>
</recording>


NEW:
<recording>
<oid>7406</oid>
<name>Fringe</name>
<channel>TV2</channel>
<filename>G:\Recorded TV\Fringe\Fringe_20120719_22352335.ts</filename>
<status>READY</status>
<startTime>2012-07-19T10:35:00.0000000Z</startTime>
<endTime>2012-07-19T11:35:00.0000000Z</endTime>
<Event>
<OID>1746520</OID>
<Title>Fringe</Title>
<SubTitle></SubTitle>
<Description>While Peter and Olivia investigate murders involving an inexplicable toxin, Astrid and her Other Side counterpart meet for the first time.</Description>
<ChannelOID>6898</ChannelOID>
<StartTime>2012-07-19T10:35:00.0000000Z</StartTime>
<EndTime>2012-07-19T11:35:00.0000000Z</EndTime>
</Event>
</recording>



3. Import recordings. (oops, now i have duplicates in my 'Recordings' view, but that's OK, I can very easily delete them from SCHEDULED_RECORDING)

HOWEVER:
Something weird happened - the air date for the migrated recordings has been changed, even though recording\Event\StartTime\ was not modifed.

ORIGINAL DB ENTRY: 2012-07-19 10:35:00
IMPORTED ENTRY: 2012-07-19 22:35:00

The import process added 12 or 13 hours (I still have a few recordings from summer time), converting from GMT to LOCAL when it wrote the record to the DB.
The front end assumes the backend stores in Zulu (GMT) time so the recording above is displayed as 10:35AM on the 20th of July

I'll attached a screenshot of the db if you want/need it. :-)