LinuxQuestions.org
Review your favorite Linux distribution.
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 02-25-2002, 01:52 PM   #1
tomplate
LQ Newbie
 
Registered: Feb 2002
Distribution: RedHat
Posts: 29

Rep: Reputation: 15
Correct Command, anyone?


I need to know exact command to copy my home directory
to another partition, as a backup. The partition is hda1 and
is already formatted for Linux.
I guess I would need to backup /etc also to keep my settings.
I have no other way to make a backup, externally, so this is
the best I can come up with. Besides home and /etc , is there
anything else I might need to backup for safety's sake?
If there is a better way than Terminal to accomplish this,
feel free to post that as well.

THANKS.

(The idea here is to protect me from my own inexperience, not
against harddrive failure.)
 
Old 02-25-2002, 02:08 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
You can use cp as follows
cd /
cp -R /home /backup
but it's anormous amount of space I guess you want to back up, I'd suggest tar everything into one file and then put this file somewere safe
cd /
tar cfv backup.tar /home
tar cfv backupetc.tar /etc

then move two tar files (backup.tar and backupetc.tar) into another filesystem if you prefer to do so. Later you can untar them
just type
tar xvf backup.tar
tar xvf backupetc.tar

Last edited by neo77777; 02-25-2002 at 04:04 PM.
 
Old 02-25-2002, 10:36 PM   #3
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Code:
cd /
find etc home -xdev | cpio -pvmd /backup
If you are going to use cp, I'd suggest the -a flag. It is the same as -dpR and will copy sym links correctly and preserve file dates.
 
Old 02-26-2002, 08:39 PM   #4
tomplate
LQ Newbie
 
Registered: Feb 2002
Distribution: RedHat
Posts: 29

Original Poster
Rep: Reputation: 15
Unhappy I don't quite understand bottom line..

First, let me say I had to create a partition, make it ext3,
and it is now set up, mountable, and named, say, MYLINUX.

NOW, I am not sure what is the final finished version of
the command I should use to copy a directory directly
to the partition MYLINUX. For example, not sure where the
-a flag should go. Still not clued-in to Terminal too well,
nor command syntax.

As soon as I finish this backup, I will be able to take an overdue
vacation...So would appreciate spelling this out. AND THANKS...
 
  


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
Is my way correct to use EXPORT_SYMBOL_NOVERS(name) ? cranium2004 Programming 7 12-30-2014 12:25 AM
how can i correct windowsXp manomohan Red Hat 1 10-01-2005 02:14 AM
What is the correct command line sytax to install an rpm on mandrake 10? Stevetgn Linux - Newbie 3 07-14-2004 09:48 AM
Am I correct? equinox Mandriva 6 03-11-2004 05:49 AM
correct mousedriver mule Linux - Hardware 2 11-13-2003 07:13 AM

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

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