TiVo Community Forum banner
1 - 20 of 40 Posts

·
Registered
Joined
·
135 Posts
Discussion Starter · #1 ·
For some reason (probably dying HDD that I am planning to replace) I lost my hack directory completely. Is there anyway I can back it up for the future. Also, are there any other files or directiries I should back up?

Thanks all
G.
 

·
Registered
Joined
·
240 Posts
What I do is use an ftp application to drag from the TiVo a copy of the /var/hack directory. I then store it on my Mac's hard drive.

Not sure how I would reinstate it if I lost network access to the TiVo though. At least I wouldn't lose all my hacks once I had restored net access.
 

·
Registered
Joined
·
135 Posts
Discussion Starter · #7 ·
Originally posted by scgf
What I do is use an ftp application to drag from the TiVo a copy of the /var/hack directory. I then store it on my Mac's hard drive.

Not sure how I would reinstate it if I lost network access to the TiVo though. At least I wouldn't lose all my hacks once I had restored net access.
What command line do you use for this?

Thanks
G.
 

·
Registered
Joined
·
135 Posts
Discussion Starter · #8 ·
Originally posted by scgf
What I do is use an ftp application to drag from the TiVo a copy of the /var/hack directory. I then store it on my Mac's hard drive.

Not sure how I would reinstate it if I lost network access to the TiVo though. At least I wouldn't lose all my hacks once I had restored net access.
Would you mind telling me what the command line was that you used?

Thanks
G
 

·
A Happy Member
Joined
·
2,062 Posts
http://www.tivocommunity.com/tivo-vb/showthread.php?threadid=159558

Is the thread.

The problem with the FTP method you use to drag the hack folder to the PC is that you will lose all the permissions on the files if you restored them (the chmod thingies).

I have not got my method to hand, but I run the gzip command or what even, it creates a compressed file of the hack folder including the permissions, then I ftp it to my pc. If any problems, ftp the gzip file back then expand it, all permissions intact.
 

·
Registered
Joined
·
240 Posts
I hadn't thought of the permissions. I have just checked my backup and it looks like the permissions are intact - maybe because I use Mac OS X which is a Unix operating system.

So, if you don't use a Mac, ignore my advice!

gwgw45 - all I did was drag the /var/hack folder from the ftp gui window onto my Mac desktop.

Strange, isn't it, that the TiVo is essentially a Mac (at least in that it uses PPC architecture) and uses Unix, like the Mac, yet all the hacking we do has to be done on a PC using an alien architecture and using an Linux OS compiled for Intel. I suppose it has to do with the sheer numbers of PCs around.
 

·
Registered
Joined
·
135 Posts
Discussion Starter · #11 ·
Originally posted by 6022tivo
http://www.tivocommunity.com/tivo-vb/showthread.php?threadid=159558

Is the thread.

The problem with the FTP method you use to drag the hack folder to the PC is that you will lose all the permissions on the files if you restored them (the chmod thingies).

I have not got my method to hand, but I run the gzip command or what even, it creates a compressed file of the hack folder including the permissions, then I ftp it to my pc. If any problems, ftp the gzip file back then expand it, all permissions intact.
Thanks, whatn you say makes a lot os sense! If you were to come across your method I would be delighted to see it:)

Cheers
GWGW45
 

·
A Happy Member
Joined
·
2,062 Posts
TO BACKUP

tar -cvh hack | gzip > hack.tar.gz

from the /var directory..
This created a 2.5MB file in the var directory which I ftp'd to my PC.


Now if all fails I can ftp the file back to /var and then run

gzip -d hack.tar.gz
cpio -H tar -i < hack.tar

from the /var directory and all should be back to normal after a restart??
 

·
Registered
Joined
·
135 Posts
Discussion Starter · #13 ·
Originally posted by 6022tivo
TO BACKUP

tar -cvh hack | gzip > hack.tar.gz

from the /var directory..
This created a 2.5MB file in the var directory which I ftp'd to my PC.

Now if all fails I can ftp the file back to /var and then run

gzip -d hack.tar.gz
cpio -H tar -i < hack.tar

from the /var directory and all should be back to normal after a restart??
Thank you so much, really, really appreciated!

GWGW45
 

·
Crown Topper
Joined
·
1,347 Posts
I'm using
0 05 * * 1 tar -cvh hack | gzip > hack.tar.gz
in my TiVos' crontabs (to back up the hack dir) and checking today, I've found the hack.tar.gz file, dated last Monday, is empty on both TiVos.

I haven't a clue what's happening; does anyone else?

crontab is in /var/hack/etc and is running the delmanual command without a hitch.

Is this one of those Read Only - Permissions - type things? :confused:

[Edit]
I just ran the command manually, and it does appear the TiVo need to be set to Read/Write

[Double Edit]
It appears I was looking in the wrong dir...
The file is present and correct in the /var dir and not in the /var/hack dir which was the one being backed up... :eek:
 

·
A Happy Member
Joined
·
2,062 Posts
Hello

I hadn't thought of adding it to cron..

I back it up in case the var directory is cleared, like tivo does when having a paddy. But I ftp it to the pc as the backup file would be deleted also when var is cleared.

Can the backup file be saved to anywhere, or are all the other locations read only??

Can it be backed up via cron to a PC?? Shared drive etc??.
 

·
Registered
Joined
·
91 Posts
You could create a scheduled job under windows (control panel) that downloads the backup file using ftp. For example:

c:\backup\tivobak.bat
Code:
ftp -s:tivo.ftp tivo
c:\backup\tivo.ftp
Code:
bin
cd /var
get tivobak.tgz
 

·
A Happy Member
Joined
·
2,062 Posts
Fantastic......

Now have edited cron to include the backup, have used your time Eric of 0 05 * * 1
Is this 5 past midnight every Monday????? if not please let me know and I will change it?

Also have a script running everytime my PC boots to backup data folders to a network standalone hard drive, have just added what you said bobbones, cheers.

Had to alter the ftp script and added a couple of blank lines as it requires you to press enter twice to bypass the login password that is not needed, also added QUIT at the end to release back to the bat file.


Thanks again, now a happier bunny, cheers Phil.
 

·
Yo Ho TiVo!
Joined
·
644 Posts
bobones said:
You could create a scheduled job under windows (control panel) that downloads the backup file using ftp. For example:

c:\backup\tivobak.bat
Code:
ftp -s:tivo.ftp tivo
c:\backup\tivo.ftp
Code:
bin
cd /var
get tivobak.tgz
Excellent :D

I've now done this so that I should have an automated backup of /var/hack once per week. I had to download tar from
here and I made a couple of changes to the two script files. First to supress the ftp login and then to quit at the end so my files look like

Code:
@echo off  
rem file to get the TiVo /var/hack backup file which is /var/hack.tar.gz  
rem /var/hack.tar.gz is created automatically once per week (on Monday)
rem using the cron crontab entry  
rem # m  h dom mon dow command  
rem 0 05 * * 1 tar -cvh /var/hack | gzip > /var/hack.tar.gz&  
ftp -n -s:tivo.ftp tivo
Code:
bin
cd /var
get hack.tar.gz
quit
 

·
Registered
Joined
·
132 Posts
Can someone please tell me what is tar, where can I get it and which directory does it go in? When I try to run 6022's command line (tar -cvh hack | gzip > hack.tar.gz) I get "tar:command not found" although it does create an (empty) hack.tar.gz file.
 

·
Registered
Joined
·
22 Posts
Restorer said:
Can someone please tell me what is tar, where can I get it and which directory does it go in? When I try to run 6022's command line (tar -cvh hack | gzip > hack.tar.gz) I get "tar:command not found" although it does create an (empty) hack.tar.gz file.
Tar is an archiver. CarlWalters posted the link in the previous post - http://tivo.samba.org/download/mbm/bin/

The tar program should go somewhere in your path (usually /var/hack/bin) and made executable.
 
1 - 20 of 40 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top