Skip to main content

Local Backup

You can never know when a hard drive will fail or a software update will cause your operating system to fail to boot.  It's always best to be prepared and build yourself a safety net.  A simple yet effective backup solution is simply an external hard drive connected to your server.  


image.png

Timeshift is an application that runs in the background on your server and performs backups to a local storage drive.  This service only copies files as they change, making it easy to perform incremental backups daily or weekly. These can be created on a schedule and old backups being automatically deleted to free up space as needed.

 

image.png

In the event of a systemsstorage drive failure, we can use the command line version of Timeshift to restore our system from the latest backup.

We can install Timeshift using the terminal:

sudo apt-get install -y timeshift

Once installed, we can open it with:

sudo timeshift-gtk

While connecting through RDP,RDP, this terminal command temporarily allows the root user's GUI applications to launch through xrdp:your user account: 
xhost si:localuser:root

The first time we open Timeshift, it'll start a configuration wizard. 

image.png

We will be asked what modeSnapshot style we want to use for our backups and we will select 'rsync'.  Rsync is open-source command-line application that specializes with incremental file transfers.

image.png

Timeshift will begin to estimate the backup size by scanning our systemssystem files. This should not take long because we are setting up a brand new operating system.

image.png

Once it's completed, we'll be asked to decide where we will be storing our backups.  We canwill select the Storage drive that we mounted earlier.earlier.  Timeshift will create a folder within the root of that drive, in our case: /mnt/storage/Timeshift.

image.png

Next, we'll have choose our snapshot level.  This allows us to customize how often we want our backups to run.run, as well as how many to keep.  Weekly backups are a great starting point, but running them nightly can help you get back up and running faster.  Enabling monthly, weekly, and daily backups will provide the most protection by ensuring you have received data going back months. 

image.png

Timeshift will ask if you want to backup the home directories for root and your account.account system accounts.  We shouldwill choose to enable both.both to include all files.

image.png

Now that we have finished setup, we can create our first backup by hitting the  vertical_align_bottom  'create'Create' button. 

image.png

A window will appear to show us the current progress.  The first backup of your freshly installed operating system shouldn't take too long.

image.png

Once the backup is completed, you're safe in the event of a backup. 

image.png

Timeshift will automatically backup your computer on the schedule we selectedselected.  Your system and files can be restored through the graphical interface, on your current system or through a Debian Live CD.