Ok so the title is a bit of a homage to the Hot Shots series of films but seriously as a windows admin you are wondering how do I copy that data from say a damaged partition to say and external USB device like a hard disk.
So remember how we mounted the damaged partition using
ntfs-3g /dev/sda1 /mnt/myrecovery
Well same thing here you need to create a folder to mount your external hard drive to.
So for example I am going to create a directory called external
mkdir /mnt/external
and I am now going to mount my external hard drive to it.
ntfs-3g /dev/sdb1 /mnt/external
So now hoping all goes well you should now have your external hard drive mounted.
So lets begin by copying the entire contents of your failed hard disk.
first lets create a new directory on the external hard drive as say i have some important data on there I dont want to mix. I am going to create a folder called recovery.
mkdir /mnt/external/recovery
So now that I have this set up, I am now going to copy my entire partition to this new folder.
so first I am going to switch to the damaged partition we mounted called myrecovery.
cd /mnt/myrecovery
Once you have switched to here just need to copy the data off to the external hard drive.
cp -Rvf * /mnt/external/recovery
The options -Rvf means
v - verbose show information while copying
f - force and dont prompt
R - copy recursively (similar to the windows xcopy /E option)
rather than using *.* we are using the Linux * wild card which will cover everything including links.
If all everything goes well you should now have copied all your data successfully without any major hiccups.
Well done Windows Admin! You have navigated your way through the Linux command line.
Oh if you are wondering how to come out of the linux system just type in reboot when done and don't forget to take the cd out when booting up. You can then check the hard disk and do what ever is required to restore the data.
To Linux Admins ok... so you knew how to do this already but windows is still very easy to work with.
No comments:
Post a Comment