Make a carbon copy of your drive/folder with Terminal!

I always see people throwing carbon copy disk programs around like no tomorrow. I've wondered to myself "why?". The termainl in Mac OSX can do it out of the box and do it for free and, for more advanced users, you can start getting rather fancy with the commands for fine tuning. Type man cp in the terminal for more info.
Say I want to make a carbon copy of my Home folder to my external disk called "Backup USB" so I can restore it later to a new drive.
Firstly, open Terminal.app found in Applications > Utilities. Make sure the External Disk is plugged in first before continuing.
Now I simply type in the following command:
cp -pvR /Users/benanderson "/Volumes/Backup USB/benanderson"
Once typed, press the return key and let the computer do its job.
I'll run through the command so people know what each section does
cp: this is the command for "copy"
-pvR: these are "flags" and tell the computer how to perform the action.
p: this flag stands for "preserve" and keeps all the file attributes intact. A file or folders owner, group, permissions and time stamp will remain the same. Say I have a file in the finder with a "created" and "modified" date of 8th September 2011 (you can see these by single clicking a file an pressing cmd+i) - if I was to copy this with the finder, the created and modified date of the copy would change to 17th December 2011 (today). By specifying the -p flag, the copy will keep the 8th of September creation and modify date. This is very important for system files that MacOSX has to keep track of.
v: verbose, it basically tells you what file is currently copying so you're not copying blind wondering what its doing and when it will finish. Its a progress bar, basically.
R: it will mimic the directory structure of the folder you are copying. without the -R flag, if you ask cp to copy a folder, it will skip the folder because the folder is not a file. With -R, it will copy the folder, the files in the folder and any folders within the folder and so on.
/Users/benanderson: this is my home folder. Your name will vary, obviously.
"/Volumes/Backup USB/benanderson": The destination of the copy on the disk "Backup USB". I need double quotes around the destination because "Backup USB" as a space in it. Without the quotes, the computer would read it as "/Volumes/Backup" and stop there, which is invalid and would cause an error, stopping the copy from working.
To restore from backup, just do it again in reverse order.
cp -pvR "/Volumes/Backup USB/benanderson" /Volumes/benanderson
Hit return and set it on its way!
If you're feeling sassy, make a carbon copy of your Macintosh HD onto another HDD, a carbon copy of your home folder from your desktop computer onto your laptop computer over the network (I do this with my iTunes folder every few months), carbon copy your HDD onto a Disk Image so you can "flash" other HDDs from disk utility. Carbon copy of your time machine or time capsule if moving to a larger disk. The cp command is increadibly useful, free, easy and powerful - its most likely what the Carbon Copy programs are doing under the hood, so why not cut out the middle man?
Just a nice tip for everyone interested!

Carbon Copy Cloner is free; its tasks are editable and restrictable; it works via a simple user interface; and it works without error. There is next to no learning curve involved, no need to learn Terminal's syntax, and none of the dangers that an error in syntax can cause when using Terminal.
Did I mention CCC is free?

Similar Messages

  • Booting system from an external drive; Folder with Question Mark

    Hello all. I am trying to setup an external USB hard drive as a bootable device for my Tiger install. This is on a Core Duo Mac Mini. I have successfully partitioned it using GUID into two partitions; A small 5gb partition for the minimal OSX install, and the remainder for data. I installed OSX onto it via my included Tiger discs that came with the Mini, no problems. However, when I try to boot from it I get a Folder icon with a question mark in the center. I can boot the Mini normally and browse the external partition. It shows no problems. Disk Utility also shows no errors on the drive. What have I missed?
    For any who are curious, my goal here is to use NetRestore to make a backup image of my main Mini hard disk. Then by booting to the external USB drive, I will be able to restore the backup image (stored on the data partition of the external drive as well) to the internal Mini hard disk.
    Mac Mini Core Dio Mac OS X (10.4.7)

    Just letting everyone know that I am still unresolved on this one. I have tried it all; Zero-overwrite erased the external drive before partitioning it, used Carbon Copy Cloner to clone the boot disk, you name it. Every situation leads to the same result; no ability to boot from the USB drive, It just acts like it can't read it. Are there "undocumented" problems booting from USB on Intel macs?

  • How to carbon copy an old hard disk with mountain lion on MBP-retina's SSD

    Well the title says it all.
    My idea is: Thunderbolt externally my old HDD and boot from it with target disk mode. Here's the first question: shall I first boot normally to initialize the OSX on the new MBPR or it doesn't matter since I am going to overwrite the whole SSD later?
    So yeah, let's say i booted using thunderbolt on with my externalized old HDD. Can I use Carbon copy cloner to copy everything exactly to the MBP-retina's SSD?
    Are there any risks in this procedure?
    Is it possible even?
    Any better and/or tested strategy to do the same thing?
    There must be a better way to transfer not only your user files and apps (see migration assistant), but also all drivers, system mods, 3rd-party system preference panes, etc.
    Thanks

    This is the closest thing to my query that I have been able to find. I recently installed ML on my late 2011 MBP. I have tons of backups from Lion and I want to continue backing up ML. I have hesitated to do so as I fear that I will not be able to recover my data and settings in the event that I decide to downgrade to Lion. If I was to downgrade back doe Lion; could I use a ML TM backup to recover my files and settings?

  • Carbon Copy Cloner - Bootable Drive

    I would like to create an exact copy of the hard drive on my iMac and transfer it to a second (and empty) hard drive on my Mac Pro (via ethernet); I presume it will allow me to boot up.
    I did try this but it only moved the files and folders over but not the system itself. I did select the 'Macintosh HD default' from the drop-down menu but the system files were not selected, and they were greyed out so couldn't click on them.
    I do remember a message saying that the destination hard drive needs to be formatted to HFS+ (I can't quite remember the actual message, sorry). I had wiped it overnight using the 7 times option, and had selected the Mac OS Extended (Journaled), as I have done over the years.
    Am I right in remembering the HFS format, and if so (or not, as the case may be!), how would I format the drive so a bootable copy is made?
    Thanks in advance for your help.

    Thank you for your reply. CCC automatically selects what it is going to copy across but doesn't allow my to select the system files and folders; that's why I posted the original question above. Using Target Disk Mode would no doubt be the same?; it's not the connection of Firewire or Thunderbolt but CCC that is the issue. I'm not ready to search through a load of boxes for a firewire cable, get under the desk to connect the two computers, and then find out that TDM doesn't confirm a bootable clone (kaz-k, please confirm it does that, and if it does offer choices on-screen then I will pursue this avenue). Originally, I left CCC copying files over a 24 hour period, and all I got was a hard drive that housed files and folders, and not a disk I could start up on its own and login etc.
    I also read the link you sent me regarding Target Disk Mode but I'm not overly convinced that dragging files to the disk will do what I want. I was expecting software to do that task for me by asking/confirming 'do you want a bootable clone?', but so far CCC and SuperDuper don't say that so are not making it easy for me.
    So, I followed your suggestion of using SuperDuper but it won't get passed password authentication because I failed to authenticate ownership; to unlock this I need to pay $27, a small amount to pay, but if the software doesn't do what I want I'm not willing to pay for it. So much for their trial period
    I was hoping for a bit of software to ask me to select the source, the destination, and then to confirm what I'd like, but neither of the above actually say Bootable or Clone drive etc.
    Perhaps I'm missing something but CCC greys out the system files and SuperDuper wants cash before the trial period is up.
    I'm scratching my head. Is there another way around this?
    Many thanks.

  • Is it possible to make a security copy of your iphone on your ipad's itunes? Es posible hacer una copia de seguridad de tu iphone en tu ipad, como si éste fuera un ordenador?

    I am about to get an ipad since I had to sell my mac. It is gonna be replacing my computer since I am not a student anymore and I do not need a computer anymore. However I was wondering where am I gonna store my iphone security copies now and I want to know if that is possible in my ipad's itunes... can someone please give me some info about it?

    Yes, you can store your backup in iCloud:
    http://support.apple.com/kb/PH12519
    Or in Spanish:
    http://support.apple.com/kb/PH12519?viewlocale=es_ES

  • Saving Outlook eMail to a hard drive folder with long subject lines

    I'm using Outlook 2010 on a WIN7 machine. I drag and drop eMails to folders on my desktop quite often and in the past (earlier version
    of Outlook) I would receive a warning that the file did not copy if the subject line was too long. When I drag and drop eMails with long subject lines now there is no visual warning or indication that the operation failed. I am aware of the file name/path
    character count limitation. My issue is the lack of a warning when the operation fails requiring me to have to check the length of the subject line before the operation or double check if the file is present after the operation. Checking after the operation
    is quite exacerbating when you are copying 15 - 20 files at a time. Is there a patch or something that can be done about this?

    Hi,
    We can also consider to get support about macro from MSDN forum:
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • After reformatting drive - folder with question mark appear

    I am using an iMac 2010
    I was planning to reformat it and install the OS Maverick from my drive but after formatting (which delete all the files from it's hard drive) after restarting a blinking question mark appears
    I have a wireless keyboard and mouse and I am trying to boot it with a CD of OS X 10.6.4
    nothing is happening when i press option c , command R ,etc
    what should i do?

    Hi,
    - Try booting with the Option key and select the Install CD in view: Startup Manager: How to select a startup volume
    - If the Option key does not respond with Starup Manager, try with a wired keyboard.
    See how you go

  • Creating a smart folder with Terminal?

    What I'm trying to do might not be possible, which wouldn't surprise me at all. What I'd like to do is one of the following:
    1. Create a smart folder that contains everything in the "/" folder.
    2. Create a smart folder that is populated with every volume currently mounted on my Mac.
    Essentially what I'm hoping to do is create a smart folder I can then use as a stack that would contain all the volumes currently located on my Mac. The only solution I've found so far for this is to use the /Volumes/ folder but this doesn't suit my needs as occasionally I get double icons for drives (1 being the alias the second being a private folder). Also it fails aesthetically which is part of the reason I'm doing this in the first place.
    If anyone could recommend a solution that'd be great. I figured Terminal was my best bet, unfortunately my knowledge of this form of coding is non-existent and no amount of Google searches could help me.

    I don't see how either item on your wish list can be satisfied by any of this "smart" stuff. The smart searches/folders are based on queries against the same metadata used by Spotlight - and that doesn't even look at / or /Volumes. Even if the info were available, is it up-to-the-minute enough to really be usable?
    If you want to examine the built-in searches as a guide, you'll find them in:
    /System/Library/CoreServices/Finder.app/Contents/Resources/CannedSearches
    Note that each of the items therein is a package, so you'll have to drill a bit deeper to get to the query file. I found that Property List Editor from XTools was a good way to get a structured view of them.

  • Inadvertently deleted user folder with terminal command - HELP!

    Hi
    I was using terminal to delete my hosts file using the following command:
    sudo rm -rf /Users/xxx/.ssh/known_hosts
    Unfortunalely, I misplaced a space after the username, and deleted most of my user files. I thought something weird was happening when all the desktop icons dissappeared, and restarted immediately.
    Now I am missing all of my docs, and desktop files. Some things are preserved, like itunes library and iPhoto library. My backup is over 6 months old.
    I took out the hdd, put in an external enclosure, and hooked it up to another SL machine. I ran stellar phoenix overnight, but the recovered files all seem to be weird system files, mostly .plist files, nothing recent.
    Any suggestions?
    Thanks

    ro-76 wrote:
    Thanks for the reply.
    My main backup is over 6 months old.
    then I suggest you start backing up regularly. there is no excuse not to do it.
    I use dropbox to backup the stuff I'm working on at the moment, but not the older stuff.
    I found it strange that I could not recover anything with Stellar Phoenix. Is there something special about deleting using terminal? Does it completely erase the file?
    not unless you use srm which you didn't. but NOT data recover software as you tried is perfect nor can it be expected to be. when you delete a file either from finder or from terminal it's unlinked from the directory but the actual space it's stored on the drive is not immediately overwritten by new data. that's what makes data recovery even possible. however, from that moment on it's treated as free space and can be overwritten at any instant. as soon as this happens data recovery becomes impossible. the only true way to protect your data is to *back up*.
    I'll try Data Rescue 3.

  • I hid a folder with terminal and now I can't get it back.

    Hey guys,
    I used this
    chflags hidden /Users//craigsequeira/Desktop/School Work
    in terminal to hide my "School Work" folder and now I don't know how to get it back!
    Could you guys help me out cause there is a lot of data in there!

    This will bring it back:
    chflags nohidden /Users/craigsequeira/Desktop/School\ Work
    To enable hidden folders/files visibility
    defaults write com.apple.finder AppleShowAllFiles -bool true ; killall Finder
    To reverse:
    defaults write com.apple.finder AppleShowAllFiles -bool false ; killall Finder

  • Rename a locked folder with Terminal

    Hi,
    I have a folder /usr/local/php5/ and I want to rename it /usr/local/php5Apache1.3/ to install a new package.
    How do I do that since I don't have write access to /local/ ?
    Thank you much

    Hi Dimitryous,
       If you don't have permissions to do it, use "sudo" to do it as a user that does have permissions. The command would be:
    sudo mv /usr/local/php5 /usr/local/php5Apache1.3
    Of course you have to be logged in as an admin user for this to work. When prompted for a password, you provide the password of that admin user.
       On the other hand, combining the source code of two packages in the same directory shouldn't work because they share a number of files. It is traditional to have a directory like /usr/local/src inside of which you put each package in its own directory. If the packages are not source code then it might not matter but it is still probably a good idea to save packages in their own directories.
    Gary
    ~~~~
       Time is a great teacher, but unfortunately
       it kills all its pupils.
             -- Hector Berlioz

  • HT201372 used this to make a bootable copy for a new hard drive installation. copied the install find but gave error code 110 when making the disk bootable.. Any help in what this code is

    Used createinstallmedis to make a copy of the Mavericks app for use in a new hard drive install.. Copied find but gave error code 110 and failed to make the flash drive bootable.. Any help in what errror code means?

    Did you partition and format the flash drive first? See the following:
    Make Your Own Mavericks, Mountain/Lion Installer
    After downloading the installer you must first save the Install Mac OS X application. After the installer downloads DO NOT click on the Install button. Go to your Applications folder and make a copy of the installer. Move the copy into your Downloads folder. Now you can click on the Install button. You must do this because the installer deletes itself automatically when it finishes installing.
       2. Get a USB flash drive that is at least 8 GBs. Prep this flash drive as follows:
    Open Disk Utility in your Utilities folder.
    After DU loads select your flash drive (this is the entry with the mfgr.'s ID and size) from the leftside list. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    Select the volume you just created (this is the sub-entry under the drive entry) from the left side list.
    Click on the Erase tab in the DU main window.
    Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    Click on the Erase button. The format process can take up to an hour depending upon the flash drive size.
    Make your own Mavericks flash drive installer using the Mavericks tool:
    Mavericks has its own built-in installer maker you use via the Terminal:
    You will need a freshly partitioned and formatted USB flash drive with at least 8GBs. Leave the name of the flash drive at the system default, "Untitled." Do not change this name. Open the Terminal in the Utilities folder. Copy this command line after the prompt in the Terminal's window:
    sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
    Press RETURN. Enter your admin password when prompted. It will not be echoed to the screen so be careful to enter it correctly. Press RETURN, again.
    Wait for the process to complete which will take quite some time.

  • External Hard Drive Unreadable After Carbon Copy Cloner Backup

    I am using a Maxtor OneTouch III Media external drive. I had formatted it to be read/writeable from Mac OS X 10.4 Tiger, and had been reading and writing files fine. Then I did a system backup to the external drive with Carbon Copy Cloner. Now when I plug the drive into the USB port, it says "the disk you inserted is not readable by this computer." I am guessing that Carbon Copy Cloner may have messed with the file system format. I had some pretty important files on there and would like to retrieve them, so I'd prefer not to reformat.
    Disk Utility shows this information for the drive:
    Name : Maxtor OneTouch III Media
    Type : Disk
    Disk Identifier : disk1
    Media Name : Maxtor OneTouch III Media
    Media Type : Generic
    Connection Bus : USB
    Connection Type : External
    USB Serial Number : RA09E5XC
    Writable : Yes
    Ejectable : Yes
    Mac OS 9 Drivers Installed : No
    Location : External
    Total Capacity : 149.1 GB (160,041,885,696 Bytes)
    S.M.A.R.T. Status : Not Supported
    Disk Number : 1
    Partition Number : 0
    Also, Partition Scheme : Unformatted
    I know that the drive had a name (besides the generic "Maxtor OneTouch III Media) before I did anything with Carbon Copy Cloner. Is my data already gone?
    Message was edited by: theleez

    Hi , and a warm welcome to the forums!
    I think the problem is more the One-touch, they can't boot PPC Macs even via Firewire.
    I think you'll have to Reformat it again... did you maybe use GUID Partition Scheme the first time?
    See this, except for the GUID part...
    http://carlbach.blogspot.com/2008/02/maxtor-one-touch-iii-and-formatting-on.html

  • Steps to Copy Existing Hard Drive

    Hi. I just bought 2 Maxtor 500GB internal SATA hard drives. I have a Power Mac G5 Dual 2.3GHz purchased April 2006. It has an existing 250 GB hard drive. I also have a Seagate Firewire 250GB External HD. Would anyone be willing to map out the step by step process of installing the 2 new 500GB HD without losing any data? No need for Serial RAID or any of that. Install one, copy to that and then install the other? I pretty much use the Mac for Business- MS Offfice, Internet Banking and email, large Music Files and future plans for Logic Music files. I know how to physically install the units. But then what....? Your help-advice would be much appreciated. Thanks.

    Hello! You have some good advice here and I would add that along with SuperDuper and Carbon Copy Cloner apps to clone with you can also use Kappy's instructions below. Always boot from the clone to make sure it boots ok. The process involves copying millions of files so there's always a possibility that everything isn't perfect so boot with the clone to make sure it's bootable. Better sooner than later as you wouldn't want to wait until a crash to find out if it's bootable. Also I recommend multiple clones with alternating dates. If you clone a system that becomes unstable 10 minutes after you've finished cloning then your current system as well as the clone may be corrupt. I note this because it happened to me. Tom
    Kappy's Steps to Produce a bootable clone
    Prep external FW drive:
    1. Open Disk Utility from the Utilities folder.
    2. Select the backup or destination volume from the left side list.
    3. Click on the Erase tab in the DU main window. Set the format type to Mac OS Extended (journaled, if available) and click on the Erase button. This step can be skipped if the destination has already been freshly erased.
    4. Click on the Restore tab in the DU main window.
    5. Select the backup or destination volume from the left side list and drag it to the Destination entry field.
    6. Select the startup or source volume from the left side list and drag it to the Source entry field.
    7. Double-check you got it right, then click on the Restore button.
    8. Select the destination drive on the Desktop and press COMMAND-I to open the Get Info window. At the bottom in the Ownership and Permissions section be sure the box labeled "Ignore Permissions on this Volume" is unchecked. Verify the settings for Ownership and Permissions as follows: Owner=system with read/write; Group=admin with read/write; Other with read-only. If they are not correct then reset them.
    For added precaution you can boot into safe mode before doing the clone.

  • Copy and paste applications folder?

    Hey,
    I used to back up my powerbook to an external drive partition using Disk Utility but niw it throws up an error after a few seconds of copying over, and I can't format the external drive as it has other important stuff on the other partitions. So I've been copying and pasting my home folder ( which works fine ) to this partition.
    What I was wondering was if I copy over my Apps folder too, in the event of my Mac dying and a new one arriving, would I be able to import my Apps folder via copy and paste and have everything sitting like it is now??
    Or does anyone know why disk utility crokes everytime??
    many thanks
    John

    I'm not sure why Disk Utility won't do what you wish, - what is the error it gives you? - but I don't think that using copy and paste will work on your Applications folder.
    The reason is that while some applicaions are self contained, many have references to folders in the /Library or /System/Library (for instance any the required an Admin password to install) as well as to your own Home/Library folder, and any of these can only be re-installed with the supplied installers.
    Instead of this, you could CLONE the hard drive which would make a complete copy of the drive on your external disk. There are several apps which will do this for you.
    In relation to copying and pasting your home folder, have you considered using software that will make incremental back ups (that is, only copy the changed files, which is a lot faster. There are many out there from the very reasonable to the horrendously expensive.
    Regards
    TD

Maybe you are looking for

  • Message no. VN108 in MR90 - Invoice Reduction

    Hi,   I cannot print out the invoice reduction form in MR90. I get the message: "No messages for initial processing exist Message no. VN108" when entering the document number/year/company code with output type REKL. I had a PO and did MIRO to enter t

  • Oracle Enterprise Manager "Performance" tab  (Oracle 10g)

    Hi, How to I make a report based on Performance TAB. View Data -> Historical Sessions Runnable Process Active Sessions Instance Disk i/o Instance throughput Explain : What is (example :*what is session for?* ) , What is X and Y (example :*what is X =

  • How to remove a keyword in Aperture 3

    I've been testing Aperture 3 now for a few hours. First impression is that it's great! Faster than Aperture 2 and raw support for LX3. In the Metadata inspector I miss the keywords-list, which in Aperture 2 used to be at the bottom of the Metadata ta

  • Iweb on the new mac air ??

    Hi all, I'm going to buy the new mac AIR , but I knew that the application IWEB doesnt come with the new OSx LION. Do you know if IWEB is available on the apple store and how much does it cost ? Do you know if OSx LION will support IWEB? Thanks a lot

  • Solaris does not see second cpu

    I have put together the following system: Asus A7M266-D mobo 2 - Athlon MP 1.6+ cpus 2 - 512 MB DDR PC2100 Maxtor 60 gb hd Matrox G450 agp video mpstat shows only cpu 0. Any thoughts on how to get both cpus running? Allen