LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-19-2007, 08:56 PM   #1
Bryan88
LQ Newbie
 
Registered: Dec 2006
Location: NY
Distribution: Ubuntu
Posts: 21

Rep: Reputation: Disabled
Simple tar based backup command?


I am looking to do a very simple full backup of my Debian box to DVD, to be able to restore if/when I screw something up. I am planning a full backup performed in separate volumes by top level directory (/home, /usr, /var, etc.). Not just /home and /etc because reinstalling and reconfiguring is a major pain.

Is there a well crafted 'tar' command with options that will do the following things?:

1. retain long names and directory structure/relationship,
2. retain the file permissions/ownerships and dates
3. backup the symlinks
4. limit each output file size to reasonable size (via spanning) (1 GB each, or a max. of 4GB on a DVD)

I know not to try to backup: swap, /proc and /mnt directories, but What about /dev? - How do I backup/restore my list of devices?
What about /tmp? - Do I need any data in there for the next boot after a restore?

Thanks,

Bryan
 
Old 04-19-2007, 10:49 PM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
You can re-create the devices so you don't need to backup /dev and neither /tmp as it only contains some temporary files and there usually is a cron job deleting that folder each day or week.

I would check 'man tar' to begin with but I do believe you need the atleast the '-p' option to retain permissions, I don't remember rest of tar's options.
 
Old 04-20-2007, 06:29 PM   #3
Bryan88
LQ Newbie
 
Registered: Dec 2006
Location: NY
Distribution: Ubuntu
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thanks - So, how to make devices?

Thanks,

So, how do I correctly "remake" the long list of devices in /dev on my box without re-installing or doing it by hand, if they aren't backed up? I wanted to be able to be able to do a complete restore from DVD media by using 'tar', and use some drive utilities for handling boot sector backup and partitioning if those get corrupted.

Will 'tar' even backup the name/links of devices or will it recurse into the "devices" and try to back them up ? -- /dev/zero and /dev/urandom could take a while

Thanks,

Bryan
 
Old 04-21-2007, 09:04 AM   #4
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
You can create the devices with MAKEDEV script in /dev.

Can't say much about the tarring the devices as I haven't used tar that much.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
backup all with tar mnauta Linux - General 3 04-03-2006 05:30 PM
Incremental Backup (tar command) maginotjr Slackware 4 07-21-2005 01:04 AM
tar as backup imsajjadali Red Hat 4 02-07-2004 03:46 PM
How to keep restorable monitor and 3D settings tar backup simple save configurat zaphod111 Linux - Newbie 2 11-08-2003 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:28 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