Rotation of recordings / using hot and cold storage
Added by Yann Ormanns almost 4 years ago
Good morning,
is there a possibility to rotate recordings, like moving all files after 1 week to a different folder, but still keep them in the recording list?
Context: at the moment, I put all recordings in /home/tv/. Now I'd like to replace my HDD with a SSD RAID1, but I wish to only keep the newest recordings on the (rather small) SSDs. The rest would then have to be moved to a NFS share or a bigger (but slower and not redundant) HDD.
Of course I could also solve this with a little bash script, but then tvheadend would not be able to assign the files to entries in its database, I assume...
I currently use tvheadend 4.2.8-r1 on Gentoo.
Kind regards and thanks in advance,
Yann
Replies (1)
RE: Rotation of recordings / using hot and cold storage - Added by Dave Pickles almost 4 years ago
If you go down the script route (which is probably the only way to do it), you can tell Tvheadend that the file has been moved:
curl --data-urlencode "src=/home/tv/RAID1/recording.ts" --data-urlencode "dst=/home/tv/HDD/recording.ts" http://user:[email protected]:9981/api/dvr/entry/filemoved
The Tvheadend user must have ADMIN privilege. See https://github.com/dave-p/TVH-API-docs/wiki/Dvr#dvrentryfilemoved.