Re: Copying partitions in terminal mode



Hello elmo,
I would suggest, that you use find and cpio.
1) both partitions have to be mounted
2) Assuming that /dev/sda7 is your root directory and /dev/sdc5 is mounted
on /mnt:
find >AllYourTopLevelDirsUnderRoot< | cpio -pdv /mnt

For example:
find /bin /sbin /usr /home /var /etc /boot | cpio -pdv /mnt

Hope that helps.


elmo wrote:
Is it practical to use terminal mode to copy an entire ubuntu partition
to an external hard drive for backup purposes?

I haven't done much with terminal commands except for the simplest ones
so I'm not comfortable with copying an
entire partition. I have copied a file or two within a partition but
copying an entire partition seems like a big job.

After digging around in my notes, a book or two, and some websites, I
came up with this command:
cp -aprv /dev/sda7 /dev/sdc5

sda7 is where ubuntu is currently installed and sdc5 is the target, an
empty ext3 formatted
partition on the external hard drive.

The command seems to be too simple to do a complete partition copy.

Which way is the better way to run this kind of command,. from an
installed ubuntu or from
a ubuntu CD?

elmo





Attachment: signature.asc
Description: OpenPGP digital signature

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • IDE HDD fail?
    ... This caused after this command: ... Device contains neither a valid DOS partition table, nor Sun, SGI or OSF ... Offline data collection status: ... Self-test execution status: ...
    (Linux-Kernel)
  • Re: How to clone Windows XP back to your HD?
    ... Admittedly, I am a little "hazy" on which command does what, but having executed both and in both and reverse order, *one* or other of the commands should have: ... Re-written the Master Boot Record - the beginning sector of a hard-drive which contains the partition table and the loading code of the active O.S. ... The MBR written with the "Grub" loading-code stubbornly refuses to be repaired with the FIXMBR / FIXBOOT commands. ...
    (microsoft.public.windowsxp.newusers)
  • Re: Help with a little dd damage!
    ... Partition 3 has different physical/logical beginnings: ... Feb 28 20:20:57 morgansmachine kernel: EXT3-fs: write access will be enabled during recovery. ... So, fingers firmly crossed, have I managed to copy enough of my hard drive with the first two commands to be able to patch back the catastrophic damage I seem to have done with the last command. ... "By choosing not to ship any proprietary or binary drivers, Fedora does ...
    (Fedora)
  • Re: How to clone Windows XP back to your HD?
    ... When you ran the FIXBOOT C: command, on your merry travels, Windows re-wrote your BOOT.INI file that deals with the startmenu adding any valid operating systems it could detect at the time. ... When you did this, the UBUNTU partition STILL EXISTED, but now does not, so if you did selected this option at boot now, I very much doubt you'd get anything but an system error. ...
    (microsoft.public.windowsxp.newusers)
  • Re: Trying to move /usr - Fixed
    ... After thinking about that mv command, ... Note /dev/ad8s1e is an empty partition (a new disk, ... I'll use user and usrdemo as the names of the ... the root of the file system. ...
    (freebsd-questions)