2020-11-27, 08:49 AM
While carry out some work on another machine I inadvertantly pulled the power plug to my RPI4 which runs NextPVR. In 999 case out of 1000 this wouldn't have been a problem but on this occasion the SD card was corrupted and the PI refused to boot. Having time on my hands, under the UK national COVID lockdown, I decided to rebuild the PI using the new native USB boot feature using a small SSD I had to hand. This all went well and I soon had a working PI again. I have been using NPVR 5.x since January and have a number of recordings that I wanted to reimport into NPVR, this is when my problems started. Due to the way in which the corruption happened I had the recordings (*.ts and *.xml files) stored safely on my NAS but the database and config.xml had been lost and I didn't have a recent export of the recordings. OK, not great problem I thought. I recreated the config via the web app and was ready to start reimporting the recordings. I have some films and a number of TV series recorded so I made a start with the films being individual files. It turns out that the xml file created by NPVR at recording time is NOT quite the format needed to reimport the recording should a problem like mine arise. I needed to edit each xml file to make the necessary changes before the import of each recording could be made. I have done this for most of the films but the thought of changing each series recording xml file is something I will have to do a bit at a time.
I know all the pain of the above is mine - however, with the stable door firmly bolted, I looked around to see if anybody had posted a backup regime (app, script etc) on the forum but couldn't find any. I guess I will need to create a script (to be run via crontab at a suitable time ?) which does the following:
stop the NPVR recording service
copy the database and config.xml file to a safe location
restart the NPVR recording service
runs a recordings export process
I think I can manage to script the first three items but how can I achieve the last (export recordings) ?
Sub - could I make a heart felt plea that you consider adding a facility to a future NPVR version to provide a backup process that allows the the user, if they wish - I do, to save the files needed for a restore like mine above to a safe location of their choosing ? I have attached a file showing the before and after changes to the xml files I had to make to get the recordings to import successfully.
Thanks
Chris
I know all the pain of the above is mine - however, with the stable door firmly bolted, I looked around to see if anybody had posted a backup regime (app, script etc) on the forum but couldn't find any. I guess I will need to create a script (to be run via crontab at a suitable time ?) which does the following:
stop the NPVR recording service
copy the database and config.xml file to a safe location
restart the NPVR recording service
runs a recordings export process
I think I can manage to script the first three items but how can I achieve the last (export recordings) ?
Sub - could I make a heart felt plea that you consider adding a facility to a future NPVR version to provide a backup process that allows the the user, if they wish - I do, to save the files needed for a restore like mine above to a safe location of their choosing ? I have attached a file showing the before and after changes to the xml files I had to make to get the recordings to import successfully.
Thanks
Chris
Server NextPVR Official Docker
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client: Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon
Recordings: OpenMediaVault (v7.x) NAS, NFS share, mounted to Docker container
Client: Docker JellyFin, NextPVR addon, Amazon Firestick, Jellyfin Addon