2024-10-08 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdautoback(8) that caused an error to be generated
	if the destination drive was already mounted.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2024-10-08 16:43:43 -04:00
parent 7d248b5cab
commit 126e5d1cc9
2 changed files with 10 additions and 5 deletions

View File

@@ -24900,3 +24900,6 @@
* Added an rdautoback.py(8) utility.
2024-10-08 Fred Gleason <fredg@paravelsystems.com>
* Changed the name of rdautoback.py(8) to rdautoback(8).
2024-10-08 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdautoback(8) that caused an error to be generated
if the destination drive was already mounted.

View File

@@ -49,12 +49,14 @@ syslog.syslog(syslog.LOG_INFO,'Starting Rivendell backup to "'+mountpoint+'"')
#
# Mount backup device
#
Path(mountpoint).mkdir(parents=True,exist_ok=True)
result=os.system(command='mount '+mountpoint)
result=os.system(command='findmnt '+mountpoint)
if(os.waitstatus_to_exitcode(result)!=0):
syslog.syslog(syslog.LOG_ERR,'unable to mount backup drive')
exit(1)
os.system(command='sleep 5')
Path(mountpoint).mkdir(parents=True,exist_ok=True)
result=os.system(command='mount '+mountpoint)
if(os.waitstatus_to_exitcode(result)!=0):
syslog.syslog(syslog.LOG_ERR,'unable to mount backup drive')
exit(1)
os.system(command='sleep 5')
#
# Dump database