1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Backup/restore: include cache directory

As mentioned in here:
https://github.com/SiCKRAGETV/sickrage-issues/issues/243
This commit is contained in:
Fernando 2014-12-30 11:27:15 -02:00
parent 8b84e4f4bc
commit 12edc24ec4

View File

@ -3539,6 +3539,10 @@ class ConfigBackupRestore(Config):
source = [os.path.join(sickbeard.DATA_DIR, 'sickbeard.db'), sickbeard.CONFIG_FILE]
target = os.path.join(backupDir, 'sickrage-' + time.strftime('%Y%m%d%H%M%S') + '.zip')
for (dir, _, files) in os.walk(sickbeard.CACHE_DIR):
for f in files:
source.append(os.path.join(dir, f))
if helpers.makeZip(source, target):
finalResult += "Successful backup to " + target
else:
@ -4716,4 +4720,4 @@ class ErrorLogs(WebRoot):
if issue:
ui.notifications.message('Your issue ticket #%s was submitted successfully!' % issue.number)
return self.redirect("/errorlogs/")
return self.redirect("/errorlogs/")