[SOLVED] I'm in LiveCD - Need help using cp and preserving all that is in my /home
Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm in LiveCD - Need help using cp and preserving all that is in my /home
I'm in a LiveCD session (Natty). I must copy my /home to an external hard drive (via USB).
I tried gksudo nautilus, but it cannot copy some files and/or directories due to file permissions.
I have a folder in /home named: .evolution. I believe this is where all the emails are stored. Is there a way, from the command line, to use
cp to copy all permissions, links - symbolic and/or hard, and all that is necessary to copy all of /home so that cp doesn't leave something out, change it or move it so it's a problem or useless? Also, is the reverse copy the exact set of commands, or after copying it all, do I only need to reverse the order of the devices-media? My /home is in it's own partition.
Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 8937 71680000 7 HPFS/NTFS
/dev/sda3 * 8938 10842 15301912+ 83 Linux
/dev/sda4 10843 48641 303620437 5 Extended
/dev/sda5 10843 47583 295122051 83 Linux
/dev/sda6 47584 48641 8498353+ 82 Linux swap / Solaris
Your usb is probably mounted already in the /media directory. Did you check that?
Also need to prefix the cp command with sudo and copy from the mount point to the other mount point.
If you use the suggestion of Larry Webb, do sudo cp -adlpr /mnt/doc/* /mnt/usb
The forward slash and asterisk should be added to get all contents.
You can not copy a /dev, you can copy the information on the dev. That is the reason to make a directory to copy and move the information and mount it to the /dev location. If you want to copy all the files on sda5 to your usb you will need to use the following.
sudo mkdir /mnt/doc (the name doc can be any name you wish but keep it simple)
sudo mount /dev/sda5 /mnt/doc
sudo mkdir /mnt/usb (usb can be any name except doc or the other dir name)
sudo mount /dev/sdb1 /mnt/usb
sudo cp -adlpr /mnt/doc/* /mnt/usb (the /* is for all files in sda5.)
Now if you only want to copy your Pictures from sda5 then you would have to specify that location in the mount location.
Last edited by Larry Webb; 05-23-2011 at 11:30 PM.
sudo mkdir /mnt/doc
sudo mount /dev/sda5 /mnt/doc
sudo mkdir /mnt/usbex
sudo mount /dev/sdb1 /mnt/usbex
sudo cp -adlpr /mnt/doc/* /mnt/usbex
this string didn't make a folder on the external (usb) hard drive. And the terminal spun out nothing but lines like this:
cp: cannot create link `/mnt/usbex/mark/Food & Foodways/Mexico/México Desconocido Las haciendas pulqueras, ruta cultural de gran atractivo._files/redes_btn6_off.png': Invalid cross-device link
cp: cannot create link `/mnt/usbex/mark/Food & Foodways/Mexico/México Desconocido Las haciendas pulqueras, ruta cultural de gran atractivo._files/footer_logo_iasa.png': Invalid cross-device link
I apologize for not making myself clear, but I'm not literate at geek-speak. I also wanted to keep this question as simple as possible, but I now believe that to be a big mistake.
I had Ubuntu Natty on my 'puter. I'm not using Unity. I tried to install Evolution 3. I didn't understand that I had to install Gnome 3 before that. Those acts "blew up" my OS. I cannot get past the log-in screen. The 'puter hangs.
I am trying to make a copy of the /home and nothing more. I have / and /home on separate partitions. If cloning the /sda5 will copy the symlinks, timestamps, permissions, groups, etc., I would prefer to do that ... I'm looking for the easiest way to do this. I'm not chary of using the command line. My plan is to clone/copy/backup my /home, re-install Natty and only if necessary, clone/copy/restore the /home.
please plug in all drives that you want to copy from/ to and run and show us the output of: df -h
since it seems like you wanna' just copy a few directorys you can just copy from the directory where the device nodes are mounted like this: sudo cp -r /media/your-usb-name/home/your-user/.evolution /whatever/floats/your/boat.
(you can backup an image of the whole drive by duplicating the device nodes like: dd if=/dev/sdxy of=sdxy.iso
but that doesnt seem to be what you want.)
/dev/sde1 is where I want to put the "copy" of /home is going.
My /home is about 40 gig-a-bytes.
I am not particular in how I get a "copy" of /home. I wish-desire-prefer to copy ALL file and directory attributes, such as permission, timestamps, symlinks, etc. to the "copy". Lacking that a copy is better than nothing, should I further damage my /home on re-installation of Natty. Seeing the output of df -h reminds me I cannot clone /sda5 to sde1 as it isn't nearly big enough to house 275 gig.