LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-21-2009, 04:17 AM   #1
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Rep: Reputation: 16
making a full backup


guys, I'm using this tar command in order to make a full backu, but for some reason is not completing... "it hangs"

Code:
tar -zcvpf /mnt/backup/fullbackup.tar.gz / --exclude=mnt/backup > /home/user/backup.log
I know there are open files by the system, and therfore, I've tried to use --exclude=dev --exclude=proc, and other folder that I think the system might be using, but still same results. Would you mind sharing some of the command you use for making full backups?

Last edited by mia_tech; 08-21-2009 at 04:19 AM.
 
Old 08-21-2009, 06:12 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Don't backup /proc, /tmp, /sys, /var/tmp, /mnt, /dev or /media. /proc and /sys files are generated on the fly by the kernel. The /dev directory is created when you boot, and changes are made by udev as you run. /tmp is not important and often cleared when you reboot. /mnt contains filesystems you mount, often large external drives. /media is for removable media that is auto mounted.
(directories under /mnt you might want to backup, but on a case by case basis, as in an internal hard drive mounted there)

Be sure to scan through the tar info manual. Do you use file attributes that tar doesn't backup?
It may depend on your version of tar, and which attributes you need backed up. E.G. se-linux or posix capabilities.

Read the section on dumps. The -g option may be useful for producing incremental backups.

I'm betting that the hangup is due to trying to backup /proc, which will generate a core image of your entire system. You may have a have circular link somewhere.
 
Old 08-21-2009, 06:15 AM   #3
Lee_Ball
Member
 
Registered: Jul 2005
Location: Manchester (UK)
Distribution: Fedora CentOS
Posts: 132

Rep: Reputation: 18
Are you also backing up the other files and folders in /mnt? if not exclude the whole directory.

tar -zcvpf /mnt/backup/fullbackup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys / > /home/user/backup.log


Try that, also, what does the backup.log file stop at?
 
Old 08-23-2009, 04:14 PM   #4
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Lee_Ball View Post
Are you also backing up the other files and folders in /mnt? if not exclude the whole directory.

tar -zcvpf /mnt/backup/fullbackup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys / > /home/user/backup.log


Try that, also, what does the backup.log file stop at?
the backu stops at the /srv forlder... it won't continue!
 
Old 08-28-2009, 04:39 AM   #5
Lee_Ball
Member
 
Registered: Jul 2005
Location: Manchester (UK)
Distribution: Fedora CentOS
Posts: 132

Rep: Reputation: 18
To check if it really has stopped you can check the size of the backup file by doing this:

Code:
watch ls -l /mnt/backup/fullbackup.tar.gz
That should tell you the size of it every 2 seconds, if its not increasing when its stopped, then yes, it may have stopped.

If that is the case see what happens by excluding the /srv folder


Code:
tar -zcvpf /mnt/backup/fullbackup.tar.gz --exclude=/srv --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys / > /home/user/backup.log
 
Old 08-29-2009, 02:21 AM   #6
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Original Poster
Rep: Reputation: 16
nahh, I gave up on tar. I started using dump which gets the backup done pretty fast. I'm talking about 7 Gigs of space down to 1.5 Gig in about 20 min...
 
Old 08-29-2009, 03:02 PM   #7
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Rep: Reputation: 37
Quote:
Originally Posted by mia_tech View Post
nahh, I gave up on tar. I started using dump which gets the backup done pretty fast. I'm talking about 7 Gigs of space down to 1.5 Gig in about 20 min...
I am interested on this... how are you using the dump command to achieve this?
 
Old 08-30-2009, 02:22 AM   #8
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Original Poster
Rep: Reputation: 16
full backup with dump

dump -0aj -f /mnt/storage/backup/home.bak /home/user

here's a good link to get your feet wet with dump.... I'm still getting to know the command, but I think one of the best functionality is the built in options of making full, incremental, and differential backups

http://surf.ap.seikei.ac.jp/~nakano/...-HOWTO.en.html
 
Old 09-03-2009, 06:12 AM   #9
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Rep: Reputation: 37
thanks it works perfectly!
 
  


Reply



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
Full Backup on Fedora clpl1980 Fedora 3 02-20-2007 07:39 AM
full System Backup czezz Linux - Software 10 05-08-2005 01:50 PM
Making space on harddrive (its full!) robson8112 Linux - General 4 01-20-2004 11:52 AM
Full Backup.... LinuxBie Linux - Newbie 3 01-02-2004 10:43 AM
full system backup dbc254 Linux - General 6 12-26-2003 09:27 PM

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

All times are GMT -5. The time now is 05:21 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
Open Source Consulting | Domain Registration