public function onBackupFinished(BackupEvent $event)
    {
        $database = $event->getDatabase();
        $database->set('finished', (new \DateTime())->format(\DateTime::RFC3339));
        $database->set('state', $event->getStatus());

        if (BackupStatus::STATE_FAILED === $event->getStatus()) {
            $database->set('exception', $this->serializeException($event->getException()));
        }
    }