View Full Version : /var/hack backup and restore
PhilG
01-23-2007, 11:25 AM
Hi all,
In my "continuing to tidy up" mode I'm lookimg to keep a fairly regular backup of /var/hack
I am using a manual process at the moment and woud like to automate it (but being a Linux nobody, I'm struggling)
from the /var/hack directory I use:
tar -cvf varhack.tar . <enter> to create a backup file, and then FTP it to my pc
I have a few questions to make this slicker
1. How can I run this from cron? (ie NOT from the /var/hack directory)??
2. Having created the backup, it'd be REALLY neat to automatically offload it. Snag is, I don't have an always running pc it can be FTP'd to, but I was wondering if it could be eMailed out a la Dailymail??
Thanks (as always) for suggestions and thoughts
PhilG
01-23-2007, 11:26 AM
Oh, and I forgot
3. If I ever need to restore from my varhack.tar, what would I type once I had FTP'd the tar back to Tivo?
yungee
01-23-2007, 11:54 AM
put it back in the /var/hack directory and:
tar -xvf varhack.tar
I was thinking about knocking up a script to back this up to another Tivo partition, in case the /var partition got wiped rather than a full Tivo failure.
ie create a folder /backup or suchlike and tar it into that.
I've not got cron running on my Tivo but am having a bit of a network card setup day on my downstairs Tivo tomorrow, so if I come up with anything useful I'll post back here.
PhilG
01-23-2007, 01:27 PM
An even BETTER idea - keeps it all local to the Tivo (provided somewhere "safe" can be found to store the .tar!)
martink0646
01-25-2007, 02:56 AM
Hi,
I've gone to /var/hack & typed "tar -cvf varhack.tar" to receive the message
"bash: tar: command not found"
I have TiVoweb installed & loads of modules, I have been messing around for a couple of years now & I have no idea where it has gone if I ever had it. Does the command need to be installed & if so where can I get it & is there a tutorial? I 'lost' my /var/hack folder once before & had to reinstall everythign & now I have a lot more to do so any help would be gratefully accepted. Thanks.
Martin
TCM2007
01-25-2007, 12:43 PM
You have to have a copy of the tar program. It's linked to on here somewhere.
PhilG
02-09-2007, 02:21 PM
Hi Yungee
Did you make any progress with the backup script?
yungee
02-09-2007, 05:24 PM
Err, not as such.
I'm still planning on knocking something up, but want to double test it and put in plenty of error checking as I'm a bit worried about letting something loose that might cause people grief (like the root partition filling up etc.)
Edit: OK, I've done the bare bones of a script and got it working on my Tivo.
It has a check in the form of a variable set at the beginning (defaults to 50Mb) of how much space you want free on root (/) after the .tar file is created.
So if the sum of the contents of /var/hack + 50Mb is greater than the free space under /, the script will not try to create the .tar file.
I'll do some more sanity checking when I'm more awake and the most basic of explanatory docs to go with it.
PhilG
02-10-2007, 01:15 PM
OK - if you want a beta tester, I'm in......
vBulletin® v3.6.8, Copyright ©2000-2010, Jelsoft Enterprises Ltd.