Score:0

Ubuntu Server 18 Backup with Raid 1

co flag

I'm having issues with my Ubuntu Server installation, updates crashing my server, so I'm thinking in using raid as kind of backup, if it's possible...

So the first step it's to put an additional hdd in the server, and configure Raid 1. I'll try to follow this guide, but I have 2 questions about the answer in the thread. Setting up RAID 1 on 14.04 with an existing drive

1 - Complete format the new drive with one partition, or I need to have the exact schema of the original drive?

2 - Copy everything? Like CP command from / to / ?

After this, how can I configure the ReSync process? The main objective it's to have a complete copy of the stable system, so if I update something, change something on the server, I want to force to manually resync, or have an configured hour to do the resync, like end of the day, it's this even possible?

I don't know if this the best solution to what I want, is a protection for hdd failure, but my main purpose is to keep a kind of backup of the complete system, and be able to "rollback" if anything go wrong with the it.

Thanks

in flag
RAID is not a backup solution and will not (realistically) allow “rollbacks” in the manner you’re thinking. If you need snapshots and rollbacks, consider rebuilding the system with ZFS, then enable ZFS replication. Send your snapshots to an external system somewhere on the network (it doesn’t need to be powerful). Then, if an update messes things up, you can roll back to any point where a snapshot exists. Is less painful in the short and long term.
guiverc avatar
cn flag
So this is a Ubuntu Core 18 server? Ubuntu has used the *year* format to represent *snap* only products since 2016, which are different systems to the more common *year.month* format or 18.04 system (18.04 format tells you the system is *deb* package based).
co flag
@matigo Thanks for the ZFS info, I'll take a look One quick question, can I for example, create some kind job/script, that for instance, once a week, the system performs a restart (cron job) and before booting, run the dd command to make a complete copy of the hard drive? Or there's no change that I could make a valid backup using this method?
in flag
You would like to run `dd` *before* the system boots? This would require a second machine to have complete access to the disk your server runs on. If the server uses a SAN or is VM-based, then it may be feasible if you have physical access to the machine. Otherwise, a more specific backup methodology will be required.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.