MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / createBackup

Method createBackup

zpr/zpr.ts:161–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 const configExists = await fs.access(this.configPath).then(() => true).catch(() => false);
160 if (configExists) {
161 await fs.copyFile(this.configPath, this.backupPath);
162 console.log("[zpr] 配置备份创建成功");
163 }
164 } catch (error) {
165 console.warn("[zpr] 创建备份失败:", error);
166 }
167 }
168
169 private static async writeConfigWithRetry(): Promise<boolean> {
170 for (let attempt = 1; attempt <= 5; attempt++) {
171 try {
172 await this.db.write();
173 console.log("[zpr] 配置保存成功");
174 return true;

Callers 1

setProxyHostMethod · 0.95

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected