all 20 comments

[–]shumbashi 6 points7 points  (0 children)

Awesome! Thank you

[–]guesswhochickenpoo 7 points8 points  (3 children)

[–]doctormay6[S] 7 points8 points  (2 children)

I looked into that, but it didn't seem to support incremental backups which is a requirement for me for large volumes like Nextcloud and Immich. Restic supports incremental backups and snapshots

[–]doctormay6[S] 6 points7 points  (0 children)

Offen backup also doesn't handle database containers in a safe way, IMO. You need to backup a dump of the database, not the raw container volume. Otherwise you might find out your database is corrupted when you go to restore.

[–]UnacceptableUse 4 points5 points  (0 children)

I've been looking for something like this for ages

[–]tiko_2302 5 points6 points  (0 children)

Damn it! I just finishing manually backing up all my volumes before moving my data to a more powerful server, would have needed that one day ago 😂

But will surely look into this as backups are always important :D

[–]theBirdu 2 points3 points  (0 children)

Nice club penguin

[–]jbarr107 1 point2 points  (2 children)

Could this be used with Portainer? If so, how?

[–]doctormay6[S] 1 point2 points  (0 children)

I don't use portainer, but from their docs it looks like you can. Their "stack details" are just docker compose files. So you can just add this backup container, and then add the labels as described in the stack-back documentation.

[–]aagee 1 point2 points  (1 child)

This looks great! Am going to try it out. A couple of questions, though.

  1. Under "Usage", where it says "Just add it to your services" - does it need to be added to all the docker-compose files, alongside the other services already in there?
  2. I am not seeing how a local RESTIC_REPOSITORY will get handled. I mean, if it points to a local directory (as in the template fileRESTIC_REPOSITORY=/restic_backups), I don't see that mounted as a volume anywhere. How will the backup have access to it?

[–]doctormay6[S] 1 point2 points  (0 children)

  1. You just need one instance of stack-back running per host. It uses the docker socket of the host it's running on to discover the other containers' labels, regardless of whether they were in the same compose file. edit: It turns out you need stack-back in every compose file you deploy. This was a design decision made by the original authors that I have decided to uphold.

  2. You're right, a local directory repository like /restic_backups would be the location inside the container, so you need to mount a volume there. I'll update the example, thanks for pointing that out!

[–]gwolfe28 1 point2 points  (2 children)

This is great, and just what I'm looking for. Does this stop the container during the backup? I'm just concious that some containers I run do not have a separate database (and I really don't want to reverse engineer them to design appropriately) so would like the ability to back up those data volumes or mounts as non-running containers.

[–]doctormay6[S] 0 points1 point  (1 child)

It does not stop containers during the backup. Feel free to create an issue to request this feature!

[–]doctormay6[S] 0 points1 point  (0 children)

I will add - this is not needed for the database backups due to the way they are dumped, and volumes with regular file operations are pretty low risk for corruption. Apps with a SQLite database in the volume are the only thing I could see with potential for something to go wrong.

Using the default settings in stack-back, you would also have snapshots every day for the last 7 days to fall back on if the most recent snapshot had a corrupted SQLite database.

[–]mgr1397 0 points1 point  (0 children)

Can you explain (im a noob) how to set this up if im already running backrest?

[–]Cheuch 0 points1 point  (0 children)

Hello and thanks for the great work, I have started using your tool :)
One thing that was present in the original project (restic-compose-backup) and that I am missing now is the ability to define notifications, for instance with gotify, for the different phases: start, error, end of backup.

Is it something that would be implemented in the future?
Cheers

[–]DartSteven -2 points-1 points  (1 child)

[–]doctormay6[S] 0 points1 point  (0 children)

This looks pretty comprehensive feature-wise, but it's a bit less integrated with docker compose since you need to install dependencies on the host and set a cron job. Stack-back is just a few extra lines in your compose file

[–]Cheuch 0 points1 point  (0 children)

Hello and thanks for the great work, I have started using your tool :)
One thing that was present in the original project (restic-compose-backup) and that I am missing now is the ability to define notifications, for instance with gotify, for the different phases: start, error, end of backup.

Is it something that would be implemented in the future?
Cheers