LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2003, 10:37 AM   #1
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Rep: Reputation: 15
Backup


Hi..
thanks at first..
question is..

I am running a redhat 8.0
and I am thinking to install freebsd.. but i have a lot of files in my redhat that is not valueable. but it will be nice for me to keep it.
I am planning to back it up. but .... I got no idea how..
i have a 6gb harddisk and i plan to get a tape drive ..
what are the good way to get it done ?
 
Old 04-14-2003, 12:00 PM   #2
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
tar, tape archive, although that is misleading, it is simply a backup file similar to zipped archives. It will create backups of files/directories and individual files can be extracted at will. Actually I was impressed with Konqueror being able to navigate a complete tar as if it simply was a directory.

the simplest way is
tar cf filename.tar <filename1> <filename2>
or
tar cf filename.tar * (wildcard)
tar cf filename.tar /path to directory/ (recursively backup from that directory down).

You can then gzip, compress, etc. It is then a single file you copy somewhere. Search google for an easily readable 'man tar' or simply search here. Tons of tar information.

RO

P.S. If the tar is too big, you can 'split' the tar file into manageable chunks then 'cat' (concatenate) back together, but I leave that as an exercise for the reader.
 
Old 04-14-2003, 03:10 PM   #3
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Original Poster
Rep: Reputation: 15
as i understand..
after you do a tar.. it will compressed all the file to one..
here is the confusing scenario for me..
let say i install a new system..
if i untar the "backup tar" file... then it will overwrite those new system file isn' t?
 
Old 04-14-2003, 03:23 PM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
It depends on what you tar and where you restore it. For example, I tarred up /root and /home completely into a single tarfile before I returned my computer and got my new one (leased from work). I then created a directory called /backup. I moved the tarfiles there and it restored them relative to /backup, so I had
/backup/root
/backup/home
and all files/subdirectories under that. It restores relative to where you are, not the absolute path for each file.

I hope that helps. Also, you can think of a tar as a big collection of 'deflated' files that are all in one large master file.

RO.
 
Old 04-14-2003, 03:29 PM   #5
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Original Poster
Rep: Reputation: 15
ok.. thx..
but what about ..
backing up specific file .. and locate it back
.. is there anyway i can tar.. with the path..
so went i untar.. it .. the backup will automatically replace
example.. those config file..
they are all over.. my system..
so .. if i back it up..
and then when i need them.. i assume i can just run the backup and it run ..
 
Old 04-14-2003, 03:39 PM   #6
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
For these type, create your tar from /, then when restoring, untar from /, which puts it in the absolute path for your system. For example, I want to backup /usr/bin, all files that start with cow (cowtip, cowview, etc)

cd /
tar cf cow.tar /usr/bin/cow*

Then, when I wanted them back, I copy the tar to / and untar it. If I only wanted cowtip, then, in /
tar xf cowtip.tar cowtip
and it would restore the one file. With tar, and that is where the reading comes in, can do a lot more than I outlined. Append to it, REPLACE files within the tar, extract any single file, etc. It is a must learn for Linux/Unix in my opinion.

RO
 
Old 04-14-2003, 03:44 PM   #7
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Original Poster
Rep: Reputation: 15
Thanks..
 
Old 04-14-2003, 03:55 PM   #8
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
No problem...happy trails.

RO
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
backup help sridhar11 Debian 1 08-30-2005 10:40 AM
backup LuckyABA Linux - Software 1 01-22-2005 12:51 PM
can I backup a root disk and boot from the new backup disk linuxbkp Linux - Enterprise 3 10-15-2004 06:42 PM
Selective backup to CDRW, or other backup methods. trekk Linux - Software 1 11-03-2003 02:46 PM
backup and update the backup file doris Linux - General 4 08-24-2002 07:26 PM


All times are GMT -5. The time now is 08:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration