Skip to content

Run automatic restic backups via a Docker container.

Notifications You must be signed in to change notification settings

hueske-digital/restic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backups

This repository contains Restic – a fast, secure, efficient backup program.

Requirements

Make sure that the Base is already set up and started.

Setup instructions

Clone the code to your server:

git clone [email protected]:hueske-digital/services/backups.git ~/services/backups

Create environment file and fill up with your values:

cd ~/services/backups && cp .env.example .env && vim .env

Pull images and start the compose file:

docker compose up -d

Add the following label to all containers which should be backuped:

    labels:
      backups: "true"

Working with backups

To work with your backups check out this project and make sure that your .env file is configured according to your existing backups.

Manual backup

docker compose exec backup backup

See your existing backups

Execute this in this projects directory to see all existing snapshots:

docker compose exec backup restic snapshots

Restore home dir

Execute this in this projects directory to restore the home dir:

docker compose exec backup restic restore --include /mnt/home --target / <SNAPSHOT ID>

If your user changed, you might have to adjust the user rights afterwards.

Restore a volume

Execute this in this projects directory to restore a docker volume:

docker compose exec backup restic restore --include /mnt/volumes/name_of_volume --target / <SNAPSHOT ID>

The --include parameter can be repeated several times to restore multiple volumes at once.

Other information

Update all container images and recreate them if new images are available:

docker compose pull && docker compose up -d

Restart a single container:

docker compose restart app

Shutdown all container of this compose file:

docker compose down

Show and follow logs:

docker compose logs -ft

Additional configuration:
You can include any other docker config by using an additional compose file.

About

Run automatic restic backups via a Docker container.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages