Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Categories
Random page
Top Contributors
Recent changes
Contribute
Create a page
How to help
Wiki policy
Adapt videos to articles
Articles in need of work
Help
Frequently asked questions
Join the discord!
Help about MediaWiki
Consumer_Action_Taskforce
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Futotemporarywikipage
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
Purge cache
General
What links here
Related changes
Special pages
Page information
Cargo data
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Step 6: Backup Strategy == Now, let’s talk about backups. It’s not enough to just have a RAID setup; you need a backup plan for when carelessness strikes. <span id="backup-method"></span> ==== 6.1 Backup Method ==== Here’s my approach: * '''Physical Copy''': I make a physical copy of my disk. This might seem old-school, but it works for me. Another approach: * '''LVM Snapshots''': You can take an LVM snapshot and then use <code>rsync</code> to back up your data. This method can be hit or miss. I don’t use this. You can take a snapshot of your drive with LVM, rsync your files off of the drive elsewhere, reinstall the operating system, and rsync them back, but… what if some of your files are for older libraries, or programs/configuration files that have different syntax with different versions? It can become a rabbit hole to hell very easily, and I’m not going to begin to torture newbies with this. '''DDRescue''' is the tool I use to make a copy of my drive. I connect the drive via a USB 3 to SATA plug and create a backup. It’s best to do this to the same make/model of drive if possible. <span id="ddrescue-guide-from-ubuntu-server-live-environment"></span> ==== 6.2 DDRescue Guide from Ubuntu Server Live Environment ==== We’re going to boot from the same Ubuntu Server LiveUSB image you created to install Ubuntu Server onto the happycloud host machine. * Boot from the USB Drive <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxc7f_tmp_911d702.png File:lu55028jxc7f_tmp_a33d9a7f.png </gallery> # Insert the USB drive into your server. # Power on the server and enter the boot menu (usually by pressing '''F12''' or another function key). # Select the '''UEFI option''' for your USB drive. # Choose to Try Ubuntu Server & do not install it. * Install ddrescue # Update package list & install ddrescue: <pre>sudo apt update sudo add-apt-repository universe sudo apt install gddrescue</pre> <ol start="2" style="list-style-type: decimal;"> <li>Check Current Drives (BEFORE Plugging in Source)</li></ol> <pre>sudo fdisk -l</pre> Take note of the present drives. <ol start="3" style="list-style-type: decimal;"> <li><p>Connect Source Drive (operating system solid state drive from the happycloud host machine). Either will do. Either connect it physically to an existing SATA/NVME port, or use a USB-SATA or USB-NVME enclosure if this makes it easier for you.</p></li> <li><p>Wait 5-10 seconds. Be patient.</p></li> <li><p>Check which drive it is. It will be the new drive that shows up. Make sure the model as well as the size & partitions matches what you are expecting.</p> <pre>sudo fdisk -l</pre></li> <li><p>Connect Target Drive (blank identical disk you are making into a backup drive)</p></li> <li><p>Wait 5-10 seconds. Be patient.</p></li> <li><p>Check which drive it is. It will be the new drive that shows up. Make sure the model as well as the size & partitions matches what you are expecting.</p> <pre>sudo fdisk -l</pre></li></ol> '''TRIPLE CHECK YOUR DEVICES''' <pre># List all drives again sudo fdisk -l</pre> <ol start="9" style="list-style-type: decimal;"> <li>Run DDRescue</li></ol> <pre>sudo ddrescue -f -d -r3 /dev/source /dev/target logfile.log</pre> For instance, if the source is <code>/dev/sdc</code> & target is <code>/dev/sdd</code>: <pre>sudo ddrescue -f -d -r3 /dev/sdc /dev/sdd logfile.log</pre> Option meanings: - <code>-f</code> : Force overwrite target - <code>-d</code> : Use direct disk access - <code>-r3</code>: Number of retry attempts on bad sectors - logfile.log: Saves progress (can resume if interrupted) '''⚠️ WARNING: ⚠️''' <ol style="list-style-type: decimal;"> <li><p>TRIPLE CHECK device names</p> <ul> <li>Wrong device = destroyed data</li> <li>Source and target reversed = destroyed source</li></ul> </li> <li><p>Target MUST be same size or larger than source</p></li> <li><p>Make sure you’re using whole drives:</p> <ul> <li><code>/dev/sdc</code> (correct, whole drive)</li> <li><code>/dev/sdc1</code> (WRONG, just one partition)</li></ul> </li> <li><p>If unsure which is which, unplug/replug and watch:</p> <pre>sudo dmesg | tail</pre> <p>It will show new devices added to the linux machine</p></li></ol> <blockquote>'''IMPORTANT NOTE:''' Always have a physical copy of a known-working server solid state drive. If something wrong, you can quickly restore your system by plugging in the backup drive and be back up in 90 seconds or less. </blockquote> <span id="raid-configuration-recommendations"></span>
Summary:
Please note that all contributions to Consumer_Action_Taskforce are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (see
Consumer Action Taskforce:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:
Cancel
Editing help
(opens in new window)