MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / ThreadfinBackup

Function ThreadfinBackup

src/backup.go:100–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100func ThreadfinBackup() (archiv string, err error) {
101
102 err = checkFolder(System.Folder.Temp)
103 if err != nil {
104 return
105 }
106
107 archiv = "threadfin_backup_" + time.Now().Format("20060102_1504") + ".zip"
108
109 var target = System.Folder.Temp + archiv
110 var sourceFiles = make([]string, 0)
111
112 for _, i := range SystemFiles {
113 sourceFiles = append(sourceFiles, System.Folder.Config+i)
114 }
115
116 sourceFiles = append(sourceFiles, System.Folder.Data)
117
118 err = zipFiles(sourceFiles, target)
119 if err != nil {
120 ShowError(err, 0)
121 return
122 }
123
124 return
125}
126
127func ThreadfinRestore(archive string) (newWebURL string, err error) {
128

Callers 1

WSFunction · 0.70

Calls 3

checkFolderFunction · 0.85
zipFilesFunction · 0.85
ShowErrorFunction · 0.85

Tested by

no test coverage detected