Duplicati

Sourabh Dey
5 min readJun 12, 2022

--

Duplicati is a really amazing backup solution for your local machine. You can use Duplicati to backup locally, to storage on your own network, or to cloud hosted storage. The front end runs in a browser window, so it essentially just runs in the background. You setup your backup, schedule it, and forget about it. Just let it do it’s job!

Today we’ll be installing Duplicati in Docker. I’m using it to backup my Docker folder, but it can be mapped to the root level folder of your system, or to your home folder, or really in any way you see fit. Then you can use the browser interface to setup the backup(s) you want.

What You’ll Need

  • Docker-CE
  • Docker-Compose
  • A location to Backup to
  • About 20 Minutes
  • Internet Connection

Docker and Docker-Compose version

Installation and Setup

Once you have Docker and Docker Compose installed, you’ll want to create a folder inside your main organizational folder. I use a folder called “docker” to keep all of my docker application folders, volume mappings, docker-compose.yml and docker-run.txt files in. This way, I just backup the “docker” folder, and all of my docker compose, docker run commands, volume data, and various application configs are backed up with it. I highly recommend you do something similar.

mkdir duplicati

cd duplicati

and we’ll create a new file called “docker-compose.yml” inside this directory.

nano docker-compose.yml

You’ll want to paste the following block of yaml text into that new file, and then we’ll go through the spots where you’ll need to make adjustments for your server.

version: "2.1"
services:
duplicati:
image: lscr.io/linuxserver/duplicati
container_name: duplicati
environment:
- PUID=0
- PGID=0
- TZ=<your/timezone>
volumes:
- /mnt/filesync/duplicati/config:/config
- /mnt/filesync/duplicati/backups:/backups
- /home/brian/:/source
ports:
- 8270:8200
restart: unless-stopped

In the file above, I have several comments. You’ll want to be sure and adjust the following items for your system:

  • PGID — might be good to give this the root user’s ID, 0, so there are no permissions issues during backup.
  • PUID — might be good to give this the root group ID, 0, so there are no permissions issues during backup.
  • TZ (time zone) — You’ll want to make this your Time Zone. Mine is America/Chicago
  • /mnt/filesync/duplicati/config:/config — use this mapping to map or create, then map a location for your backup config. Make sure this location exists before making the mapping. Only change the left side of the colon “:”.
  • /mnt/filesync/duplicati/backups:/backups — use this mapping to map or create, then map a location for your backup storage. Only change the left side of the colon “:”.
  • /<your root level folder to choose backup locations from>:/source — this is the mapping of the root level. Only change the left side of the colon “:”.
  • 8270:8200 — feel free to change the left side of the colon “:” to any open port on your host machine.

Save the file and then run the command

docker-compose up -d

Since I already created it does not show the pulling image logs

You can verify in the docker ps command

Now let’s go to your favourite browser

it should be look something like these

Just ignore the Test Backup for now !

Now log in again with the password

Let’s configure our first backup

Click next
if you are using it on production please choose encryption method for backing up your data
I am gonna backup my Downloads Folder

In my downloads folder there are two folder

Schedule the backup time according to your requirement I am going to leave it default
Now let try the backup
Click on run now

Now let delete the data under the download folder from the source

Now click on the restore tab

I am gonna leave it default you can change if you want
Bingo our data restore

Hope you like !

--

--

Sourabh Dey

Trying To learn as much as possible about different Techonology. About me I am just a normal Boy who lives in terminal