Lesson 3: Backing Up your VPS
2023-03-30
202 words
1 min read
This article describes how to back up your Linux server. Some of these methods will vary depending on your distribution of Linux, in my example, I am using Ubuntu so these methods should work if you are also using Ubuntu.
How do you back up a Headless Ubuntu Server from Command Line?
Step 1.
APT Repository Install
To begin install the
duplicity
package run the following command:
sudo apt-get update
sudo apt-get install duplicity
Step 2.
Creating Our Backup Folder Location
To do a full backup let’s create a folder in our users home directory called backup:
cd ~ && mkdir backup/
Using Duplicity to Make Full Backup of System
To take a full backup to our “~/backup” folder run the following command, replacing your path to your backup folder.
sudo duplicity full / file://home/israel-master-key/backup
You will be asked to enter a passphrase because the files will be encrypted for an extra layer of security.
This may take a while.
Restoring Your Full Backup with Duplicity
Run the following command to restore your
sudo duplicity restore file:///path/to/backup/folder /
You will be asked to re-enter your passphrase to decrypt your files, and your full backup will be restored.
Duplicity on Remote Server
Related Articles:
- 2023/03/30 Lesson 2: Updating your VPS
- 2023/03/30 Lesson 1: SSH the Secure Shell Protocol
- 2023/03/30 What is Linux Security?
- 2023/03/29 How to Open Terminal on Linux?
- 2023/03/29 How to Open Terminal on Mac?
Authored By Is-Rael Landes
Is-Rael Landes, a good man living on the earth, loving making website, teaching others and coding.