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