tiro-notes 0.30.4212 → 0.30.4213

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.
Files changed (2) hide show
  1. package/cli.js +4 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -27,7 +27,7 @@ ARGS:
27
27
 
28
28
  --tunnel/-t : [require autossh] uses autossh to "publish" the app on the web, requires a server you can access with ssh and autossh installed on that device. (ex:npx tiro-notes@latest -t REMOTE_USER@REMOTE_URL:REMOTE_PORT)
29
29
 
30
- --backup/-b : [require tar] will incrementally backup changes in archives.
30
+ --backup/-b : [require tar] will incrementally backup changes in archives like tiro.0.xz.tar, tiro.1.xz.tar... every day in a specific folder. You can then execute commands after that process in a post backup script (useful for syncing these archives to clouds, think rsync, rclone etc.)
31
31
  --backup-folder : modify backup folder destination. (default: "your/path/to/tiro/data_folder"+_backup
32
32
  --backup-post-script : modify script to be executed after a backup finishes. Should be a ".txt" file with your OS commands. (default: "your/path/to/tiro/data_folder"+_backup/post_backup_script.txt
33
33
 
@@ -150,12 +150,13 @@ const startBackupScript = async (argsObj, dataFolder) => {
150
150
 
151
151
  let backupCli = `mkdir '${backupFolder}'; mkdir '${backupFolder}/backups'; cd '${backupFolder}'; ${tarExec} --xz --verbose --create --file="backups/tiro.$(ls backups/ | wc -l | sed 's/^ *//;s/ *$//').tar.xz" '${dataFolder}' --listed-incremental='${backupFolder}metadata.snar'; ${replaceTimestampCli()}; ${postBackupScript}`
152
152
 
153
-
153
+ const debugObj = {backupFolder, postBackupScriptFile, postBackupScript, lastBackupTimestamp, timeInterval, backupCli}
154
+ console.log ("[BACKUP] starting backup logic!");
155
+ console.log (debugObj);
154
156
 
155
157
  const debugBackupNow = isDev ? false : false
156
158
  const processBackupEveryDay = () => {
157
159
  // if > 1 day
158
- console.log({backupFolder, postBackupScriptFile, postBackupScript, lastBackupTimestamp, timeInterval, backupCli});
159
160
  const diff = backupInterval + lastBackupTimestamp - new Date().getTime()
160
161
  const diffMin = Math.round(diff / (1000 * 60))
161
162
  if (diff < 0 || debugBackupNow) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiro-notes",
3
- "version": "0.30.4212",
3
+ "version": "0.30.4213",
4
4
  "description": "Tiro Notes CLI to start Tiro Notes from the command line!",
5
5
  "scripts": {
6
6
  "dev": "ISDEV=true node cli.js",