* Retry on lock being unavailable
* Refactor locking to return plain error
* Collect LockedTime in stats
* Add test case
* Add documentation for LOCK_TIMEOUT
* Log in case lock needs to be awaited
* Release resources created for awaiting lock
* Split code into multiple files
* Deduplicate logic for pruning backups against different storages
* Only parse templates when notifications are enabled
* Use better description