1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 14:55:07 -05:00

MainDB is backed up before being restored now to .r* versioned backup backups

This commit is contained in:
echel0n 2014-06-05 16:14:57 -07:00
parent fc7b28a8bc
commit 34009bb9b8

View File

@ -897,8 +897,8 @@ def restoreVersionedFile(backup_file, version):
return False return False
try: try:
logger.log(u"Trying to backup " + new_file + " to " + new_file + '.rtmp before restoring backup', logger.DEBUG) logger.log(u"Trying to backup " + new_file + " to " + new_file + "." + "r" + str(version) + " before restoring backup", logger.DEBUG)
shutil.move(new_file, new_file + '.rtmp') shutil.move(new_file, new_file + '.' + 'r' + str(version))
except Exception, e: except Exception, e:
logger.log(u"Error while trying to backup DB file " + restore_file + " before proceeding with restore: " + ex(e), logger.WARNING) logger.log(u"Error while trying to backup DB file " + restore_file + " before proceeding with restore: " + ex(e), logger.WARNING)
return False return False