How to Backup or Clone Linux Partitions Using ‘cat’ Command

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Hosting referral link if you planning to start your blog ($3.82/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

7 Responses

  1. dzaczek says:

    Hi,

    Nice tutorial but when we cloning partition/disk must remember about change uuid after copy. If disk will stay connected to machine after reboot we can have problem with mount by uuid.

    Sometimes we want to have the same uuid but you must remember to remove the disk from the server for xfs file system.

    # xfs_admin -U {uuid} {device}
    

    for ext file systems

    # tune2fs /dev/{device}  -U time 
    

    For reiserfs

    # tunefs.reiserfs -i {uuid} {device}
    
    • Ravi Saive says:

      @Daczek,

      I agree with you, we should change the uuid after creating a clone or copying disk and thanks for sharing the commands for changing the UUID in Linux. Hope it will help other users..

  2. James pinkerton says:

    Morning Ravi, I see what cat does and just wondered why when making a bootable usb pen-drive the code listed on most web-sites uses dd if=whatever.iso of=/dev/sdb, I read that dd copies saved files byte by byte probably from ascii coded text, how does cat work. I am a novice user of Linux, currently taking in all knowledge to gain my ” Red-Hat CSA”. I use your website daily, very informative chunk size blocks of data. Thank you

  3. Jalal Hajigholamali says:

    Hi,
    Thanks for nice article

  4. PP says:

    Another one is writing ISO images to flash drives. Su to root and then, `cat fedora-24.iso > /dev/sdx`

  5. Rafael Rojas says:

    Thanks Ravi Saive for this article!!. One question, can I use the cat command to clone a partition with database files? like MySQL, or it’s works only if the original partition contains only text files?.

    • Ravi Saive says:

      @Rafael,

      In Linux everything is file, so the cat command will work on all types of files, whether it is database file or any file type extension, you can easily clone any partition..

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 202,035
  2. 9,267
  3. 38,621

Are you subscribed?