Smart Backup
Run node {baseDir}/smart-backup.js with approved source and destination directories. Sync and restore require separate trees. Backup excludes its destination if it is under the source. Avoid roots being modified concurrently by another process. Backup copies are uncompressed. Links and special files are skipped when collecting files.
| Options | Effect |
|---|---|
--backup <source> [destination] [--dry-run] |
Create a dated backup under the selected destination; the default is backups/smart-backups. |
--backup <source> [destination] --incr [--from-manifest <manifest>] |
Copy changed files only. An incremental backup contains only its copied files. |
--verify <backup-directory> |
Verify copied files using the manifest. Valid legacy manifests with truncated digests report that limitation. Verification detects mismatch; it does not authenticate a backup's origin. |
--restore <backup-directory> <destination> [--force] |
Check manifest and hashes first, then copy. Existing files are skipped unless the user approves --force. |
--sync <source> <destination> [--dry-run] [--force] [--delete] |
Preview first. Existing files are overwritten only with --force; removing destination-only files also requires --delete and user approval. |
--list, --status, --dedup [directory] |
List backups, inspect status, or find duplicate file content. |
--dir <path> selects the default backup destination and listing location. Incremental hash state is local to the workspace.
Version 1.0.9 validates backup and restore paths and manifest entries, uses full SHA-256 for new backups, and corrects destination and option parsing.
