File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -170,11 +170,16 @@ def get_container_names(container: Container) -> Iterable[str]:
170
170
171
171
@pycron .cron (SCHEDULE )
172
172
def backup (now : datetime ) -> None :
173
+ print ("Starting backup..." )
174
+
173
175
docker_client = docker .from_env ()
176
+ containers = docker_client .containers .list ()
174
177
175
178
backed_up_containers = []
176
179
177
- for container in docker_client .containers .list ():
180
+ print (f"Found { len (containers )} containers." )
181
+
182
+ for container in containers :
178
183
container_names = get_container_names (container )
179
184
backup_provider = get_backup_provider (container_names )
180
185
if backup_provider is None :
@@ -211,7 +216,9 @@ def backup(now: datetime) -> None:
211
216
backed_up_containers .append (container .name )
212
217
213
218
duration = (datetime .now () - now ).total_seconds ()
214
- print (f"Backup complete in { duration :.2f} seconds." )
219
+ print (
220
+ f"Backup of { len (backed_up_containers )} containers complete in { duration :.2f} seconds."
221
+ )
215
222
216
223
if success_hook_url := get_success_hook_url ():
217
224
if INCLUDE_LOGS :
You can’t perform that action at this time.
0 commit comments