tiro-notes 0.40.66 → 0.40.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +3 -2
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -171,7 +171,8 @@ const startBackupScript = async (argsObj, dataFolder) => {
|
|
|
171
171
|
// are we between 1am-5am ?
|
|
172
172
|
const isBetween1am5am = new Date().getHours() >= 1 && new Date().getHours() <= 5
|
|
173
173
|
if ((diff < 0 && isBetween1am5am) || debugBackupNow) {
|
|
174
|
-
|
|
174
|
+
debugBackupNow = false
|
|
175
|
+
console.log(`[BACKUP] time has come, BACKUP! (debugBackupNow:${debugBackupNow})`);
|
|
175
176
|
|
|
176
177
|
let backupCli = `${replaceTimestampCli()}; mkdir '${backupFolder}'; mkdir '${backupFolder}/backups'; cd '${backupFolder}'; echo '[${new Date().toLocaleString()}] -> new backup started' >> backups.txt; ${tarExec} --xz --verbose --create --file="backups/tiro.$(ls backups/ | wc -l | sed 's/^ *//;s/ *$//').tar.xz" '${dataFolder}' --listed-incremental='${backupFolder}metadata.snar'; ${postBackupScript}`
|
|
177
178
|
// append to backup CLI current timestamp to last_backup_timestamp
|
|
@@ -184,7 +185,7 @@ const startBackupScript = async (argsObj, dataFolder) => {
|
|
|
184
185
|
|
|
185
186
|
console.log (debugObj);
|
|
186
187
|
} else {
|
|
187
|
-
console.log(`[BACKUP] time has no come... still waiting for ${diffMin} mins AND waiting for being between 1am-
|
|
188
|
+
console.log(`[BACKUP] time has no come... still waiting for ${diffMin} mins AND waiting for being between 1am-5am`);
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
|