From 30246a234679994c1d792cf1a1cdc934f871ad0b Mon Sep 17 00:00:00 2001
From: Einar Forselv <eforselv@gmail.com>
Date: Thu, 18 Apr 2019 03:53:03 +0200
Subject: [PATCH] Ensure the backup_process label is set for the backup process
 container

---
 restic_volume_backup/cli.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/restic_volume_backup/cli.py b/restic_volume_backup/cli.py
index 31d79d2..9283307 100644
--- a/restic_volume_backup/cli.py
+++ b/restic_volume_backup/cli.py
@@ -34,12 +34,15 @@ def main():
         # TODO: Errors when repo already exists
         restic.init_repo(config.repository)
 
+        print(containers.this_container.environment)
+
         print("Starting backup container..")
         backup_runner.run(
             image=containers.this_container.image,
             command='restic-volume-backup start-backup-process',
             volumes={},
             enviroment={},
+            labels={"restic-volume-backup.backup_process": 'True'},
         )
 
     # Separate command to avoid spawning infinite containers :)