LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-29-2004, 11:52 PM   #1
sln
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Rep: Reputation: 0
Question Backup entire system with tar


I want to do a complete backup of a linux box "everything" in case an upgrade doesn't work. This box only has a cdrom, floppy and harddrive with the following capacity:
[root@linuxcracy]# df -ah
Falsest Size Used Avail Use% Mounted on
/dev/hda5 4.4G 1.7G 2.5G 39% /
none 0 0 0 - /proc
/dev/hda1 53M 34M 17M 66% /boot
none 251M 0 251M 0% /dev/shm
none 0 0 0 - /dev/pts

I was going to use a tar command but what should I use "tar -cvxf TheWholeThing.tar.gz /". Please make a suggestion and do I have enough space? I would then sftp the tarfile to a different computer. Do you have a different suggestion.

Does anyone have a good tar script to will tar everything.

Thanks:
Steve
 
Old 04-30-2004, 01:52 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
For backups, you probably want to exclude directories such as /proc, /mnt, and /lost+found. /proc is for currently running processes; /mnt is for mount points which you can recreate easily; and lost+found is for things fsck found which it can't put back in place and you have to do it manually. You don't really need to backup anything which you have on the distro's installation cd's. It it breaks, you can reinstall. If you downloaded anything, and kept the file you downloaded in an archive, backup that archive, and use it the same as you would an install cd. If you did not keep it in an archive, then you will have to determine where all the pieces are and backup the appropriate directories. The things that really need backup are /etc (all your configs), /home, and any data directories or partitions you have set up.
To use tar, study the man pages or info pages carefully. Select the options which apply to your situation. If you know enough about tar, construct include and exclude text files to use with the appropriate tar options, it will simplify how much you have to type on the command line.
Above all, do a google search on 'backup script' or some such keyword search. There are numerous scripts you can download to study to see if they suit your needs.
 
Old 04-30-2004, 04:32 AM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You are also going to want to leave out /dev.

Not that it is particularly large, but they are all generic anyway (unless you make any changes to /dev).
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar system backup...best pack/unpack order? mikeybsae Linux - Software 3 08-20-2004 11:12 AM
Tar syntax to backup system... robbow52 Debian 5 08-05-2004 12:35 PM
system backup with tar tjay Linux - General 3 06-09-2004 12:32 PM
How to backup entire system without shutting down andrewjschmidt Linux - General 6 06-01-2004 07:01 PM
How can I backup my entire system? TheDirtyPenguin Linux - Software 5 03-16-2004 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:37 AM.

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
Open Source Consulting | Domain Registration