18
submitted 5 months ago by StaySquared@lemmy.world to c/linux@lemmy.ml

Hello everyone!

My manager just brought to my attention that this organization has a CentOS 6.3 server - he didn't specify what it's hosting just yet but asked that I find a solution to do a full backup so that we may restore later onto bare metal with the option to migrate from CentOS to another Linux distro.

Has anyone had experience with backing up / restoring CentOS 6? And if you know what would be the best Linux distro to replace CentOS 6? Or even a step by step guide for both or either one?

Please and thanks in advance!

top 17 comments
sorted by: hot top controversial new old
[-] Bell@lemmy.world 9 points 5 months ago

I have a CentOS 6.8 server that I backup with:

dd if=/dev/sda of=/dev/sdb conv=sync,noerror bs=4M

Of course change the sda/sdb to whatever your source(backup drives are

[-] StaySquared@lemmy.world 4 points 5 months ago

Wow.. that's nice and clean - straight forward.

Thank you!

[-] Max_P@lemmy.max-p.me 4 points 5 months ago

Note: do that from a live CD/USB or with the source drive mounted readonly. If you dd a mounted and used filesystem, you'll most likely end up with a corrupted and useless filesystem on the target.

[-] StaySquared@lemmy.world 1 points 5 months ago

Nice! Thanks for the tip!

[-] lemmyvore@feddit.nl 3 points 5 months ago

I want to point out that tools like dd or clonezilla will take a copy of the system as-is, in full.

If you want to make it more efficient you may want to look into Borg backups taken in raw mode. It's similar to what the above tools do, but splits the image into chunks and if you repeat the backup it only stores the chunks that changed.

This means you can take snapshots regularly with minimal storage waste. If you did this with the other tools you'd occupy the full image size each time you do it.

Borg also has remote support over SSH, and can do compression and encryption.

[-] StaySquared@lemmy.world 1 points 5 months ago

Thank you for the suggestion! I think the goal is to have a system as in image backup. But possibly to also back up the data and configuration to then restore that onto a new Linux distro. This is an assumption of course and I hope that is the case. I think my manager had been falling behind on updates/upgrades/back ups with some of the servers and now coming on board this will be my task(s) to handle.

[-] lemmyvore@feddit.nl 2 points 5 months ago

Backing up just configuration is much simpler and efficient, but it depends greatly on how the system was set up. If you're just taking over it's probably safest to just take a disk image, with any of the methods.

[-] lemmyreader@lemmy.ml 6 points 5 months ago* (last edited 5 months ago)

For backup and restore :

To move from CentOS to sometimes very similar look at Rocky Linux or Alma Linux. There may even be seamless migration methods for it.

[-] exu@feditown.com 5 points 5 months ago

Without knowing what was being hosted, the only surefire way would be pulling a complete disk image with cat or dd.

If you wanted to stay on a similar system, RHEL 9 would be a good option or one of its "as similar as possible" like AlmaLinux.

Other common distros for servers are Debian, Ubuntu server and Suse SLES/OpenSuse Leap.

[-] SpaceCadet@feddit.nl 2 points 5 months ago

Without knowing what was being hosted, the only surefire way would be pulling a complete disk image with cat or dd.

That's not surefire, unless you're doing it offline. If the data is in motion (like a database that's being updated), you will end up with an inconsistent or corrupt backup.

Surefire in that case would be something like an lvm snapshot.

If you wanted to stay on a similar system, RHEL 9 would be a good option or one of its “as similar as possible” like AlmaLinux.

No love for Rocky?

Also Oracle Linux is still free, and fully compatible with RHEL.

[-] LeFantome@programming.dev 1 points 5 months ago

No love here for Rocky or Oracle for that matter.

Alma is looking better and better all the time ( or RHEL if you can afford it ).

[-] SpaceCadet@feddit.nl 1 points 5 months ago* (last edited 5 months ago)

What has Rocky done?

Also, I 100% understand not liking Oracle as a company, but anyone can use OEL freely without ever having to deal with Oracle the company, and it's a damn good RHEL substitute.

[-] StaySquared@lemmy.world 2 points 5 months ago

Yep, that's the goal. A complete disk image. I'll do some research on the other distros you've recommended. I appreciate it!

[-] Morphit@feddit.uk 1 points 5 months ago

Is there any reason to keep the existing set-up? If it's just one drive, you could replace it with another and install Alma or something fresh. Then you could copy over whatever config the old system had to get up and running again. You could swap to the old drive if you needed to revert. If you have a spare machine, you could stand up the fresh setup side-by-side with the old one before swapping over.

[-] StaySquared@lemmy.world 1 points 5 months ago

I have to sit down with my manager to get the full scope of work. I assume we would do a backup of the existing machine as a fallback. Then create another back up that would strictly be data and config to then restore onto a new Linux distro. But that's purely conjecture at this time.

[-] Pacmanlives@lemmy.world 4 points 5 months ago

Any reason you can’t just do your normal backups? Should be easy enough to do an rsync if you don’t have a backup solution

[-] StaySquared@lemmy.world 2 points 5 months ago

I just barely joined the organization, so I'm not entirely sure what's in our environment/infrastructure. First task given to me is to find a full image back up solution. My assumption is that we wants to move off of CentOS for obvious reasons and move onto a new Linux distro. I haven't spoken with my manager just yet to get a better idea as to what the end game is. Hopefully today I'll get the full scope. I can't imagine we'd want to continue using CentOS.

this post was submitted on 22 May 2024
18 points (87.5% liked)

Linux

48186 readers
1243 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS