LinHES Forums
http://forums.linhes.org/

fsck renamed all my recordings
http://forums.linhes.org/viewtopic.php?f=21&t=23991
Page 1 of 1

Author:  joelsplace [ Sun Apr 27, 2014 1:11 pm ]
Post subject:  fsck renamed all my recordings

I ran fsck on my RAID5 that stores all my recordings. It deleted the recordings dir and moved all the recordings to lost+found and renamed all of them. The dates and times seem ok still. How can I rename all the recordings back to the correct names? There should be some way to do that based on the time stamps, correct? I've got about 4TB worth of recordings.
Thanks!

Author:  bobmyth [ Sun Apr 27, 2014 5:53 pm ]
Post subject:  Re: fsck renamed all my recordings

You need to write a script to automate this (PERL, Python, etc). You'll have to recreate the timestamp for each file and then search your database for a matching filename/timestamp. If you get a match, then you'll know what channel ID to use. If you don't get any matches, then the file has probably been removed, finally if you get multiple matches you'll have to manually intervene to determine the channel ID.

I hope that helps.

Author:  joelsplace [ Sun Apr 27, 2014 7:30 pm ]
Post subject:  Re: fsck renamed all my recordings

It would if I was smart enough to do that. Does Myth use the channel ID in the recording file name?

Author:  joelsplace [ Sun Apr 27, 2014 8:29 pm ]
Post subject:  Re: fsck renamed all my recordings

It looks to me like the file name is 4 digit channel id_YearMonthdayTime.mpg

Author:  bobmyth [ Thu May 01, 2014 9:58 pm ]
Post subject:  Re: fsck renamed all my recordings

joelsplace wrote:
Does Myth use the channel ID in the recording file name?

CCCC_YYYYMMDDHHmmss.mpg

Where
CCCC is the "chanid" from the database.
YYYY is the 4 digit year
MM is the 2 digit month (with a leading zero if necessary)
DD is the 2 digit day of the month (leading zero)
mm is the 2 digit hour of the day (24 hr clock, leading zero)
ss is the 2 digit seconds of the day (leading zero).

You can do this manually if you are patient. Like sorting hay from a haystack if you have a lot of recordings, though.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/