Backup in Linux doesn't need to be complicated. I'll show you backup strategies and tools to create a reliable backup for your entire Linux server. You can use this perfectly in combination with Docker Volumes and Databases.
We will use the free and open-source software Duplicati.
Project Homepage: https://www.duplicati.com Documentation: https://duplicati.readthedocs.io/en/latest/ Source Files: https://github.com/duplicati/duplicati
Video: https://youtu.be/JoA6Bezgk1c
- Linux Server running Ubuntu 20.04 LTS or newer
- Domain that points to the public IP of your Linux Server
You can still install Docker on a Linux Server that is not running Ubuntu, however, this may require different commands!
You can still install Docker on a Linux Server that is not running Ubuntu, however, this may require different commands!
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
Download the latest version (in this case it is 1.25.5, this may change whenever you read this tutorial!)
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo docker-compose --version
sudo usermod -aG docker $USER
Create a new docker-compose.yml
file in your project folder e.g. /home/<your-username>/nextcloud
.
You can also create a new folder in the /opt
directory, this may require different permissions.
Navigate to your project folder, and execute the following command.
docker-compose up -d
Open the web interface of Duplicati at https://your-server-address:8200
, and log in with the default username, and password ...
/ ...
.