Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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?
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.
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 ..
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.