Go to file
Kevin Veen-Birkenbach 13b1b7d493 removed unecessary trigger 2024-02-06 00:00:25 +01:00
LICENSE Initial commit 2023-06-19 13:07:00 +02:00
README.md Implemented validate function to substitute trigger directory 2024-01-29 19:49:51 +01:00
cleanup-all.sh removed unecessary trigger 2024-02-06 00:00:25 +01:00
cleanup.sh changed rights 2024-02-05 21:06:38 +01:00


Cleanup Failed Docker Backups

This repository hosts a Bash script designed for cleaning up directories within the Docker Volume Backup system. It is intended to be used in conjunction with the Docker Volume Backup project.


This script operates by traversing subdirectories within a specific main directory and, under certain conditions, proposes their deletion to the user. It is useful in managing backup directories, especially when certain directories can be cleaned up based on the absence of a particular subdirectory and the name of the directories themselves.

The script takes two arguments: a backup hash and a trigger directory. It constructs the main directory path using the given backup hash, and then iterates over all items within the main directory. If a directory's name matches a specific date-time-stamp pattern and lacks the specified trigger directory, the script will list its contents and ask for user confirmation to delete the directory.

For more detailed information about the script's workings, refer to the comments within the cleanup.sh script file.


To use this script, clone this repository to your local system and run the script with the necessary arguments. The command should be structured as follows:

bash cleanup.sh BACKUP_HASH

Replace BACKUP_HASH and TRIGGER_DIRECTORY with your actual values.


This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more information.


This script is developed by Kevin Veen-Birkenbach. You can reach out to him at kevin@veen.world or visit his website at https://www.veen.world.

Created with Chat GPT