Linux - GeneralThis 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
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 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.)
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
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.