|
|
|
12-03-2004, 04:46 PM
|
#1
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Backing up the /hack directory and all sub directories
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.
|
|
|
12-03-2004, 04:52 PM
|
#2
|
|
Registered User
Join Date: Jun 2002
Posts: 22
|
Have a look at showthread.php?threadid=159558 (sorry can't post full URL)
__________________
Dougie
2x120GB | Cachecard | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
|
12-03-2004, 04:59 PM
|
#3
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Thanks a lot Douggie, unfortunately I can't find the thread in question:-(
G.
|
|
|
12-03-2004, 05:01 PM
|
#4
|
|
Registered User
Join Date: Jun 2002
Posts: 22
|
Try h t t p : / / w w w . tivocommunity.com/tivo-vb/showthread.php?threadid=159558
__________________
Dougie
2x120GB | Cachecard | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
|
12-03-2004, 05:32 PM
|
#5
|
|
Registered User
Join Date: Oct 2000
Location: Market Harborough, UK
Posts: 184
|
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.
|
|
|
12-03-2004, 06:40 PM
|
#6
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Quote:
Originally posted by dommac2000
Try h t t p : / / w w w . tivocommunity.com/tivo-vb/showthread.php?threadid=159558
|
Thanks Dougie (notice just one g this time) :-)
|
|
|
12-03-2004, 06:41 PM
|
#7
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Quote:
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.
|
|
|
12-03-2004, 06:43 PM
|
#8
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Quote:
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
|
|
|
12-03-2004, 06:53 PM
|
#9
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
http://www.tivocommunity.com/tivo-vb...hreadid=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.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
12-04-2004, 04:50 AM
|
#10
|
|
Registered User
Join Date: Oct 2000
Location: Market Harborough, UK
Posts: 184
|
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.
|
|
|
12-04-2004, 05:34 AM
|
#11
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Quote:
Originally posted by 6022tivo
http://www.tivocommunity.com/tivo-vb...hreadid=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
|
|
|
12-04-2004, 05:18 PM
|
#12
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
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??
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
12-04-2004, 05:25 PM
|
#13
|
|
Registered User
Join Date: Nov 2004
Posts: 135
|
Quote:
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
|
|
|
04-02-2005, 06:36 AM
|
#14
|
|
Crown Topper
Join Date: Dec 2002
Location: Milton Keynes, UK
Posts: 1,241
|
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?
[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... 
__________________
Eric
160Gb TiVo + 120Gb TiVo █..█ Both with:-
CacheCard + TiVoWeb + Mode 0 + EndPad + Daewoo-DS608P (SetPal) FreeView
Try my To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. and my To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. .
Last edited by ericd121 : 04-02-2005 at 06:51 AM.
Reason: Further Research Reveals That I'm An Idiot
|
|
|
04-02-2005, 01:16 PM
|
#15
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
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??.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
04-02-2005, 02:17 PM
|
#16
|
|
Registered User
Join Date: Jan 2004
Posts: 91
|
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
|
|
|
04-02-2005, 02:41 PM
|
#17
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
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.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
04-03-2005, 06:03 AM
|
#18
|
|
Yo Ho TiVo!
Join Date: Oct 2001
Location: RG4, Caversham, Berkshire, UK
Posts: 579
|
Quote:
|
Originally Posted by bobones
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
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
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. UK Series 1 v2.5.5 + 160G + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. + To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Digital Cable PACE 4000, Broadband 750K
|
|
|
04-03-2005, 08:00 AM
|
#19
|
|
Registered User
Join Date: Jan 2002
Location: NE England
Posts: 132
|
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.
|
|
|
04-03-2005, 11:47 AM
|
#20
|
|
Registered User
Join Date: Jun 2002
Posts: 22
|
Quote:
|
Originally Posted by Restorer
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.
__________________
Dougie
2x120GB | Cachecard | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
|
04-03-2005, 12:41 PM
|
#21
|
|
Registered User
Join Date: Jan 2002
Location: NE England
Posts: 132
|
Quote:
|
Originally Posted by dommac2000
|
Ah, missed that. Thanks for the gen. Working fine. Now I gotta find out about this cron thing.
|
|
|
04-03-2005, 02:25 PM
|
#22
|
|
Shrubber
Join Date: Jun 2002
Location: In a shrubbery
Posts: 375
|
Well I tried all that and when I ran
tar -cvh hack | gzip > hack.tar.gz
It reports back segmentation fault and terminates. (Also says that if I dont put any parameters either).
Anyone any ideas (have set tar permission to 755 btw)
Neil
__________________
Thomson 6021 TiVo 2 x 120GB, Cachecard, TiVoWeb (WAP ), Endpad, Software Red Dot Killer + Grundig SkyD also Thomson 6023 TiVo 400GB +Turbonet, TWP, DTT (x2) ...... oh 'nt telly
|
|
|
04-03-2005, 03:27 PM
|
#23
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
Are you running it from the var directory and have you called your hack directory hack??
Permissions probably have to be set.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
04-03-2005, 03:38 PM
|
#24
|
|
Shrubber
Join Date: Jun 2002
Location: In a shrubbery
Posts: 375
|
Running it from var directory
I do indeed have a directory called /var/hack - which runs loads of stuff and the TAR in var/hack/bin is set to permissions 755
(for info var/hack is set to 755 as well)
Neil
__________________
Thomson 6021 TiVo 2 x 120GB, Cachecard, TiVoWeb (WAP ), Endpad, Software Red Dot Killer + Grundig SkyD also Thomson 6023 TiVo 400GB +Turbonet, TWP, DTT (x2) ...... oh 'nt telly
|
|
|
04-04-2005, 06:54 AM
|
#25
|
|
Crown Topper
Join Date: Dec 2002
Location: Milton Keynes, UK
Posts: 1,241
|
Quote:
|
Originally Posted by 6022tivo
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?
|
Close, it's 5:00am every Monday.
5 past midnight would be
05 0 * * 1
I put this comment in crontab to remind me.
# m h dom mon dow command
# m=minute h=hour dom=dayofmonth mon=month dow=dayofweek
# dayofweek is the day number of the week where
# 0 (or 7) are Sunday, 1 Monday, 5 is Friday, 6 Saturday.
__________________
Eric
160Gb TiVo + 120Gb TiVo █..█ Both with:-
CacheCard + TiVoWeb + Mode 0 + EndPad + Daewoo-DS608P (SetPal) FreeView
Try my To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. and my To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. .
|
|
|
04-04-2005, 07:34 AM
|
#26
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
Fantastic advice eric, I will add this into my crontab file.
I am glad I rewrote a module for tivoweb so I could easily edit the crontab file and save it with the browser. So have added..
I will also post the link below which makes it wasy to create the values for the kick off times..
http://www.clockwatchers.com/cron_tool.html
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
04-04-2005, 04:20 PM
|
#27
|
|
Crown Topper
Join Date: Dec 2002
Location: Milton Keynes, UK
Posts: 1,241
|
To Carl (or anyone else willing to answer) A couple of questions.
Question 1
I see from your comment
rem 0 05 * * 1 tar -cvh /var/hack | gzip > /var/hack.tar.gz&
that you have backgrounded the backup.
Is this necessary (he asked, not really sure what backgrounding is, or does  )?
Question 2
I have two TiVos (lucky me  ).
Do you think I should set up two Windows Scheduled Tasks, or one with this adaption of your code
Code:
@echo off
ftp -n -s:tivo.ftp tivo1
ftp -n -s:tivo.ftp tivo2
Code:
bin
cd /var
get hack.tar.gz
quit
Ooh! I thought of a third question.
Question 3
Where does hack.tar.gz end up on the PC?
__________________
Eric
160Gb TiVo + 120Gb TiVo █..█ Both with:-
CacheCard + TiVoWeb + Mode 0 + EndPad + Daewoo-DS608P (SetPal) FreeView
Try my To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. and my To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. .
|
|
|
04-04-2005, 04:26 PM
|
#28
|
|
A Happy Member
Join Date: Oct 2002
Location: North West, UK
Posts: 2,041
|
Re Q1, Same as you fella??. Backgrounding??
Maybe someone will pop along and answer..
Q2 The one should be ok..
"I have two TiVos" ohhhh get you!!
Q3 Ends up in the same directory as the FTP script.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Media Center PC -> 3 x Xbox 360's
Pioneer 505XDE (Still the best)
|
|
|
04-04-2005, 04:35 PM
|
#29
|
|
elly's dad
Join Date: Mar 2002
Location: near Warwick, UK
Posts: 158
|
Quote:
|
Originally Posted by 6022tivo
Q3 Ends up in the same directory as the FTP script.
|
You could use:
lcd <desired pc directory name>
to change to a different directory on the PC before downloading the file
(lcd=local change directory)
__________________
bleep - bleep - bleep
120Gb Samsung and 512Mb Cachecard now fitted
|
|
|
04-05-2005, 01:47 PM
|
#30
|
|
Shrubber
Join Date: Jun 2002
Location: In a shrubbery
Posts: 375
|
No one have any ideas why I get Segmentation fault then??
Neil
__________________
Thomson 6021 TiVo 2 x 120GB, Cachecard, TiVoWeb (WAP ), Endpad, Software Red Dot Killer + Grundig SkyD also Thomson 6023 TiVo 400GB +Turbonet, TWP, DTT (x2) ...... oh 'nt telly
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|