BACKGROUND I still consider myself sort of a noob when it comes to setting up server. So when answering this question, please give as much detail as possible in your answers.
ENVIRONMENT I run a LEMP server off of a Raspberry Pi 4, which is a perfectly functional email server as well as a functional web server.
THE PROBLEM Since I'm still a noob, I'm prone to mistakes. Therefore, there have been, and will be in the future, times where I accidentally misconfigure something or multiple things without realizing (or rememberding) exactly what I misconfigured or how to fix it. Therefore, I am looking for a proper local backup solution for an Ubuntu server on a Raspberry Pi (arm). Below are the specifics of what I need my backup solution to include...
THE DESIRED SOLUTIONS In these cases, it seems most desireable to have 2 backup drives to provide two for two different types of Automated Backup Solutions:
Incremental Backups - The First backup drive, would ideally be required to work exactly like a COMMAND-LINE only Time Machine on Mac OS. The only difference is it would create incremental backups for all files (including the root directory) as opposed to just the user directory like Mac OS Time machine. This would ensure that all of my server applications (PHP, Nginx, Postfix, Wordpress, etc.) and configurations installed under the root, the /var, the /etc and other important root user directories, would be backed up and restorable to an earlier date. The other requirement would be that the backup tool maintain proper exact permissions, and have an easy way to fully restore all files to the server from an earlier date.
Cloned Backups - The second drive should have a COMMAND-LINE backup solution that functions similarly to an application on MacOS called ApplePi-Baker which creates clones of your linux drive, by first shrinking all partitions with extra space, and then creating an clone in ".iso" format which can be DD'd directly to a usb drive and booted up into linux as an exact copy of the original drive. On my Ubuntu Server, I desire a solution with similar functionality. Except, I need the solution to be able to clone the drive of the running server. Ideally, I'd want the second drive to be used to create local exact clones of the original server (in ISO format), so that if anything went severly wrong beyond restoring from an incremental backup, that I could just DD the ISO image to a new drive, and boot up, for an easy regression to a once again perfectly working server. Again, I need the format of these clones to be in ".ISO" format as a proper disk image, with all extra space in each partition shrunk to elminate free space, to make the cloned ISO files as small as possible.
THE QUESTIONS
- Can anyone recommend a tool, tools, or commands that can be run as a cron job to accomplish the above two desired solutions?
- In addition, can you recommend any other PROPER solutions to fully backing up an Ubuntu 20.04 LEMP server, incase of severe disaster or administration misconfiguration?
Thanks for any help and advice here. I am very lost finding a proper linux solution for this!
0 Answers