Guidance on backups

ShaunHH

New Member
Hi all,
I'm running custom firmware on my Humax - and it's been working great for years. Currently I'm starting to get some HD errors and was thinking about the inevitable failure at some point....
Can't complain really - everything has been running reliably since 2015 :)
I don't want to fork out for a new disk just yet (I might replace with an SSD if these are reliable enough - might have a further question on this ;)).

Media files in the Video folder get backed up to my Synology NAS so that's fine, but I was wondering about the best way to back up all the settings for / webif / crontab / scripts etc, and what would be best way to restore them after the disk failure happens at some point.

I'm not sure what are the key directories/files that I need to backup.
My linux knowlege is getting very rusty. Would TAR be the way to backup?
Or maybe just use SyncBack (windows program that I currently use for backing up the media files) to copy directories/files over to the NAS at regular intervals?

Thanks for any advice,

Shaun

Fox HDR - Custom firmware version: 3.13 (build 4028)
 
Currently I'm starting to get some HD errors and was thinking about the inevitable failure at some point....
Can't complain really - everything has been running reliably since 2015 :)
I don't want to fork out for a new disk just yet...
That's nothing, mine have been running since 2010. Reliability is better if you run a disk 24/7 rather than have it powering on and off. By "HD" I presume you mean "HDD" – I had to read that twice because "HD" in TV terms means "High Definition". See Glossary (click).

I might replace with an SSD if these are reliable enough
There's plenty of discussion about this already, but "SSD" is too short a search term for the forum search – use Google:
site:hummy.tv/forum ssd.

I was wondering about the best way to back up all the settings for / webif / crontab / scripts etc, and what would be best way to restore them after the disk failure happens at some point.
Somebody more qualified in that area will have to guide you on that, and it's easy enough to just grab everything under /mod, but I would be cautious when it comes to restoring. It's better (IMO) to perform a proper installation from scratch, so keep a record of the packages you have installed rather than expect to just restore them. Also, unless you are careful how you make the backup, file attributes might not be preserved so restoring an executable file ends up with a broken system if the file is not restored with executable status. Tar might work, but just copying to (say) FAT32 and copying back will destroy attributes.
 
Thanks for the Speedy reply!
That's nothing, mine have been running since 2010. Reliability is better if you run a disk 24/7 rather than have it powering on and off.
Impressive! I ran the maintenance mode check/repair, so maybe my one will limp on for a little while longer before it finally crumbles. We will see...

By "HD" I presume you mean "HDD"
I do indeed - slip of the keyboard :)
I'll have a further browse around the forum to see what people are saying about SSDs, and reliability. I fitted a 240GB SSD in my Mum's Youview recorder a year back, which seems to work OK - so far - but it's early days...

Also, unless you are careful how you make the backup, file attributes might not be preserved so restoring an executable file ends up with a broken system if the file is not restored with executable status. Tar might work, but just copying to (say) FAT32 and copying back will destroy attributes.
Thanks - I had a feeling that the direct copy to FAT might be problematical.
I tried making a TAR archive (copying from /mod). It copied a lot of directories/files - maybe more than I need to copy.
Perhaps you are right - maybe it is easier to rebuild from scratch...
 
I'm running custom firmware on my Humax - and it's been working great for years. Currently I'm starting to get some HD errors and was thinking about the inevitable failure at some point....
Please could you say what errors you are seeing and how frequently?
I don't want to fork out for a new disk just yet (I might replace with an SSD if these are reliable enough - might have a further question on this ;)).
A good quality SSD will work for a reasonable number of years but it will be more expensive and not offer any significant performance increase; the main advantage being the lack of noise.
 
Please could you say what errors you are seeing and how frequently?

A good quality SSD will work for a reasonable number of years but it will be more expensive and not offer any significant performance increase; the main advantage being the lack of noise.
Hi Martin,

Thanks for your reply. I've had some odd problems with picture breakup in some of my recordings for a couple of weeks, and the warning alert was also showing for a couple of weeks...
I had a 2hr fixdisk session at the weekend it's not giving the red warning alert any longer, although when I go to the disk diagnostic page there are some red areas in the attributes table:
(have to admit, I don't know what these mean really)
ID lines 5, 197,and 198 are currently showing as highlighted red in Attributes table.

Attributes table
IDNameFlagsRaw ValueValueWorstThresholdLife LeftNotes
1Raw_Read_Error_RatePOSR--163108502117093006-
3Spin_Up_TimePO----0097097000-
4Start_Stop_Count-O--CK1743808308302079%-
5Reallocated_Sector_CtPO--CK33209209203688%-
7Seek_Error_RatePOSR--243943329084060030-
9Power_On_Hours-O--CK4150805305300053%-
10Spin_Retry_CountPO--C-0100100097100%-
12Power_Cycle_Count-O--CK871909209202090%-
184End-to-End_Error-O--CK0100100099-
187Reported_Uncorrect-O--CK352001001000-
188Command_Timeout-O--CK0100100000-
189High_Fly_Writes-O-RCK18082082000-
190Airflow_Temperature_Cel-O---K51049 (51°C)042 (58°C)045 (55°C)In_the_past
194Temperature_Celsius-O---K51051058000-
195Hardware_ECC_Recovered-O-RC-163108502039030000-
197Current_Pending_Sector-O--C-1100100000-
198Offline_Uncorrectable----C-1100100000-
199UDMA_CRC_Error_Count-OSRCK0200200000-


Self-test logs

No.DescriptionStatusRemainingWhenFirst Error LBA
# 1Selective offlineCompleted: read failure90%41465874216315
# 2Selective offlineCompleted: read failure90%41464869329385
# 3Selective offlineCompleted: read failure90%41463723174767
# 4Extended offlineCompleted: read failure80%41460196593673
# 5Short offlineCompleted without error00%41460-
 
Last edited:
I had a feeling that the direct copy to FAT might be problematical.
Yes, don't do that.
I tried making a TAR archive (copying from /mod). It copied a lot of directories/files - maybe more than I need to copy.
Something like this should work:
tar zcvf /mnt/hd3/backup.tgz -C /mod .
and then you can copy the backup file off to somewhere else.
Restoring should be just copying the file back and changing the 'c' to 'x' in the command.
D lines 5, 197,and 198 are currently showing as highlighted red in Attributes table.
You need to run the fixdisk process again to get rid of the 197,198 sector.
 
Somebody more qualified in that area will have to guide you on that, and it's easy enough to just grab everything under /mod, but I would be cautious when it comes to restoring. It's better (IMO) to perform a proper installation from scratch, so keep a record of the packages you have installed rather than expect to just restore them. Also, unless you are careful how you make the backup, file attributes might not be preserved so restoring an executable file ends up with a broken system if the file is not restored with executable status. Tar might work, but just copying to (say) FAT32 and copying back will destroy attributes.
I would agree, although you don't need to backup/restore everything under /mod it would get too complex to try and be more specific, just excluding .ts and .log files from the backup would probably keep it to a reasonable size
 
Something like this should work:
tar zcvf /mnt/hd3/backup.tgz -C /mod .
and then you can copy the backup file off to somewhere else.
Restoring should be just copying the file back and changing the 'c' to 'x' in the command.
Thanks - that's perfect! Just gave it a try. By the way, what does the trailing dot at the end of the command mean?
Might be good to put that in a regular job in crontab and download with my weekly media backups...

You need to run the fixdisk process again to get rid of the 197,198 sector.
thanks, I'll give that a try next...
 
I would agree, although you don't need to backup/restore everything under /mod it would get too complex to try and be more specific, just excluding .ts and .log files from the backup would probably keep it to a reasonable size
Thanks for the useful extra info - I guess log files would compress pretty well if gzipped. Are there any ts files that sit in the /mod path usually?
 
Last edited:
Are there any ts files that sit in the /mod path usually?
During Decryption, ad detection, shrink etc temporary files are produced under /mod before the final versions are moved back to the My Video tree.
If you take backups at quiet times there are unlikely to be any hanging around but it is possible,
 
what does the trailing dot at the end of the command mean?
The contents of the current directory, as always. So as it's just changed to /mod by way of the -C switch, then it's the contents of /mod (end of sentence)
tar
gets pissy if you try to use absolute pathnames as input.
 
If the GNU tar package is installed, useful options might be --one-file-system --exclude='/mod/tmp/*'.
 
ID lines 5, 197,and 198 are currently showing as highlighted red in Attributes table.
You can see from the Self-test logs that each time it is stopping at a different place. Follow prpr's advice and keep running fixdisk until the self test completes. You then need to keep an eye on the disk health to see if the problem comes back fairly quickly. If it does then it is time to think about replacing the hard drive.
 
You can see from the Self-test logs that each time it is stopping at a different place. Follow prpr's advice and keep running fixdisk until the self test completes. You then need to keep an eye on the disk health to see if the problem comes back fairly quickly. If it does then it is time to think about replacing the hard drive.
Thanks - I set this off 10 hours ago and it is still finding errors and re-writing sectors.. Guess the Disk Health isn't looking so good...
 
Thanks - I set this off 10 hours ago and it is still finding errors and re-writing sectors.. Guess the Disk Health isn't looking so good...
I have known cases where fixdisk runs for several days but the hard drive was still in use three years later. See how many reallocated sectors you have when fixdisk finishes and then see if it increases over the next few days.
 
Hi, Back again with some further questions. :)
I've left fixdisk running since thursday, but it seems to be stuck in a loop...

-------------------------------------------------------------
Running select disk self test
Error at LBA 0
/dev/sda:
re-writing sector 0: succeeded
Running select disk self test
Error at LBA 0
/dev/sda:
re-writing sector 0: succeeded
Running select disk self test
Waiting... 6362

---------------------------------------------------------------
Waiting decrements form 6362 to 6361, 6360 and then back to 6362... Been there for the last 12+ hours I think.
Should I still just leave it going?

I was wondering - are there any utilities that I could use on a PC (Linux live disk?) that perform the same function on the HDD if I removed it ? I've got a couple of PCs here.
I've also got some hard disks lying around and was thinking of shoving one in the Humax and get temporarily up-and-running for a while (I've got some TV I was intending to record tonight).

Thanks!
 
Some might disagree, but in my experience a failure at LBA 0 is unrecoverable, at least using the CF facilities.

I've also got some hard disks lying around and was thinking of shoving one in the Humax and get temporarily up-and-running
Yeah, why not.
 
Back
Top