Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(the above copies all of the MBR, not just the partition table, but that is normally OK)
But the above will not recreate extended partitions, since extended partitions are just a chain of more partition tables spread across the disk. So we could use this instead:
However, the above will not work with GPT partition tables, nor will it work with partitions larger than 2TB.
Question: So what is the best CURRENT strategy for backing up both partition table types (GPT and MBR), and extended partition data, and large partitions? I don't currently use GPT or have large partitions, but I'm sure I will in the future, so I'd like to know how to properly backup and restore this partition info going forward.
Thanks. That looks like exactly what I need. I found the commands in the "gdisk" package for LinuxMint (my desktop distro), but the package was named "gptfdisk" on SystemRescueCD (my recovery distro).
With GPT disks there is already a backup of the table at the "end" of the disk; if the primary partition table is damaged a program like gdisk will offer to recover the table from this backup. This is one of the advantages of GPT vs. MBR.
I am more concerned about making sure I am set up, backup-wise, for a bare metal restore on a new disk, not so much for repairing an existing disk using GPT's backup partition table at the end. Backing up the actual data on the partitions, that is easy. I guess backing up the partition table is easy too, I just didn't know how to do it for GPT. I was mentally still stuck back in the MBR, dd, and sfdisk days. My plan, up until I just learned about these gdisk tools, would have been to manually recreate the partitions. I have not read through the man pages on gdisk yet, but I am assuming it can dump the partition info to a file and also recreate partitions based on input from a previous dump file, like sfdisk can.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.