1 """Backup platform for the Recorder integration."""
3 from logging
import getLogger
8 from .util
import async_migration_in_progress, get_instance
10 _LOGGER = getLogger(__name__)
14 """Perform operations before a backup starts."""
15 _LOGGER.info(
"Backup start notification, locking database for writes")
19 await instance.lock_database()
23 """Perform operations after a backup finishes."""
25 _LOGGER.info(
"Backup end notification, releasing write lock")
26 if not instance.unlock_database():
None async_post_backup(HomeAssistant hass)
None async_pre_backup(HomeAssistant hass)
bool async_migration_in_progress(HomeAssistant hass)
Recorder get_instance(HomeAssistant hass)