I agree, you might want to do what happens when a backup is created https://github.com/concrete5/concrete5/blob/master/web/concrete/core/libraries/backup.php#L34