Fix last_backup broken link detection
This commit is contained in:
parent
e45ae1b1b6
commit
0dde6b8df9
@ -148,7 +148,12 @@ class Backup:
|
||||
try:
|
||||
self._last_backup = os.readlink(f'{self.output}/simple_backup/last_backup')
|
||||
except Exception:
|
||||
logger.error('Previous backup could not be read')
|
||||
logger.warning('Previous backup could not be read')
|
||||
else:
|
||||
logger.info('No previous backups available')
|
||||
|
||||
if not os.path.isdir(self._last_backup):
|
||||
logger.warning('Previous backup could not be read')
|
||||
|
||||
# Function to read configuration file
|
||||
@timing(logger)
|
||||
@ -282,6 +287,8 @@ def simple_backup():
|
||||
else:
|
||||
backup_options = '-arvh -H -X'
|
||||
|
||||
output = os.path.abspath(output)
|
||||
|
||||
backup = Backup(inputs, output, exclude, keep, backup_options)
|
||||
|
||||
if backup.check_params():
|
||||
|
Loading…
x
Reference in New Issue
Block a user