|
@@ -122,7 +122,6 @@ func executeBackup(backupConfig *BackupConfig, deepBackup bool) (string, error)
|
|
copiedFileList = append(copiedFileList, assumedTargetPosition)
|
|
copiedFileList = append(copiedFileList, assumedTargetPosition)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -153,7 +152,7 @@ func executeBackup(backupConfig *BackupConfig, deepBackup bool) (string, error)
|
|
log.Println("[Debug] Adding " + filename + " to delete marker")
|
|
log.Println("[Debug] Adding " + filename + " to delete marker")
|
|
} else {
|
|
} else {
|
|
//This file has been marked. Check if it is time to delete
|
|
//This file has been marked. Check if it is time to delete
|
|
- if time.Now().Unix()-val > 120 {
|
|
|
|
|
|
+ if time.Now().Unix()-val > 3600*24 {
|
|
log.Println("[Debug] Deleting " + filename)
|
|
log.Println("[Debug] Deleting " + filename)
|
|
|
|
|
|
//Remove the backup file
|
|
//Remove the backup file
|
|
@@ -223,6 +222,12 @@ func HandleBackupProcess(backupConfig *BackupConfig) (string, error) {
|
|
return "", nil
|
|
return "", nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//Restore accidentailly removed file from backup
|
|
|
|
+func HandleRestore(backupConfig *BackupConfig, targetFile string) error {
|
|
|
|
+
|
|
|
|
+ return nil
|
|
|
|
+}
|
|
|
|
+
|
|
//Get and return the file hash for a file
|
|
//Get and return the file hash for a file
|
|
func getFileHash(filename string) (string, error) {
|
|
func getFileHash(filename string) (string, error) {
|
|
f, err := os.Open(filename)
|
|
f, err := os.Open(filename)
|