If your project files are spread across folders and devices and manual backups keep slipping, the practical fix has two layers. First, schedule a local backup with your own operating system’s built-in scheduler — cron on macOS or Linux, Task Scheduler on Windows — so you maintain an independent copy of your project folders. Second, let Nutstore sync the folder you actually work in, right-clicking an existing folder to sync it without relocating it or using mklink. Keep those roles separate: sync keeps working copies consistent across devices, but it can also propagate changes and deletions, so it never replaces a scheduled backup, and edits you never saved or uploaded are not protected.
This guide gives you concrete, copy-ready examples for both platforms so you can automate backup & sync in an afternoon. One caveat up front: a backup copy only protects you if the scheduled job actually runs as expected and the copy is kept separately. Feature availability can also vary by platform and plan.
What You’ll Need Before You Start
Before you touch a scheduler, confirm you have the following in place:
- A Nutstore account and a current supported desktop client. Go to the Nutstore website, create an account, and download the client for your platform. Windows, macOS, and Linux desktop clients are supported; feature availability can vary by platform and plan.
- One or more project folders you can read and modify.
- Permission to install software and create scheduled tasks on your machine.
- A separate backup destination — an external drive, NAS, or a distinct backup location. It must not be the same folder Nutstore syncs.
- Access to
cronon macOS/Linux or Task Scheduler on Windows. - Basic scripting ability: edit a script, run a terminal command, or create a PowerShell action.
- A restore-test plan. A backup only protects you if the scheduled job runs as expected and the copy is kept separately.
Scheduled Backup vs Sync — Know the Difference
This distinction is the core of the whole workflow. A scheduled backup and a sync job solve two different problems.
| Role | What it does | What it does not do |
|---|---|---|
| Scheduled local backup | Creates an independent copy on a schedule you control | Does not automatically keep working folders consistent across devices |
| Nutstore sync | Keeps the working folder consistent across supported devices and web access | Does not replace an independent backup; may propagate changes or deletions; does not protect unsaved or unuploaded edits |
Step-by-Step Guide to Automate Backup & Sync
Each step below opens with a summary, gives concrete actions, and ends with an expected result so you can follow any single step in isolation.
Step 1: Set Up Nutstore Sync for the Folder You Actually Use
Summary: Connect your real working folder to the cloud without moving it.
- Install the current Nutstore desktop client on Windows, macOS, or Linux and sign in.
- Locate your existing project folder in its current location.
- Right-click the folder and choose the Nutstore sync option. This is arbitrary folder sync — the folder does not need to be moved into a designated Nutstore folder, and no
mklinkcommand line is required. - Confirm the folder selection and allow the initial sync to complete.
- Verify that successfully synced files can be accessed from another supported device or through the web app.
A few optional and conditional features are worth knowing:
- Cloud Bridge Mode (where available) keeps local placeholder files of only about 4 KB while actual files reside in the cloud, downloading on demand, with cache space that can be capped and auto-cleaned. Do not assume Cloud Bridge availability on every platform.
- Delta Sync is a PC-client-only feature that uploads only the modified portion of a file, reducing upload size when its thresholds are met: original file over 64 KB, delta under 70% of the original, and delta under 10 MB. Compressed files (
zip/rar), images (jpg/png), and videos do not support Delta Sync. - Boundary note: do not use this workflow for code repositories. Nutstore is not a code version control tool.
Expected result: Your project folder stays where it is, appears in Nutstore, and is reachable from your other supported devices or the web.
Step 2: Verify What Nutstore Sync Protects — and What It Does Not
Summary: Understand the risk boundary before you rely on sync.
The “scheduled backup vs sync” distinction matters here because sync is built for working-copy consistency, not archival safety.
- Sync can propagate deletions or changes. If you delete a file locally, that change may sync to other devices.
- Edits you never saved or uploaded are not available through cloud sync.
- Version history availability and retention depend on the plan. As documented reference points, Personal Free retains version history for 1 month and Advanced Team for 12 months; the recycle bin holds root-folder items for 30 days and keeps subfolder items permanently while the account is active.
- Conflict copies may be preserved, but preserving a conflict copy does not mean automatic content merging or guaranteed zero data loss.
- A successful sync does not prove the file is backed up. The independent backup job must run and be stored separately.
Expected result: You can state clearly which of your files are protected by sync and which still depend on your own backup job.
Step 3: Create a Separate Backup Destination
Summary: Give your backup a home that sync can never touch, and make sure your script can confirm it is looking at the right device before it copies.
- Choose an external drive, NAS, or a separate backup location.
- Keep the backup destination separate from the Nutstore sync folder.
- Identify the mount point of that destination — for example
/Volumes/BackupDriveon macOS or/mnt/nason Linux — and note it, because your script will check it before every run. - Add a device check, not just a path check. A path or drive letter only says something is mounted there; it does not say the destination is the right device. On Windows the same letter can be reassigned to another volume, and on any platform a different volume can occupy the same mount point. To reduce that risk, store a stable identifier on the real destination and have your script compare against it: write a small marker file (such as
.backup-target) whose contents are a unique value you choose, or record the volume serial / volume label. The examples below compare the marker file’s contents to an expected value. Treat this as a safeguard that catches the common cases — a copied marker file, or a drive that happens to share the same label, can still defeat it — rather than an absolute guarantee. - Define a naming pattern and retention policy. The examples below write each run into its own folder named with a full timestamp, such as
2026-11-02_143012, and delete nothing from older folders, so you prune old dated folders yourself according to your policy. - Exclude temporary caches, build artifacts, and other nonessential files.
- If the project is sensitive, consider encryption at the destination and secure handling of any credentials.
- Remember the caveat: a backup copy only protects you if the scheduled job runs as expected and the copy is kept separately.
Why the destination checks matter: if the external drive or NAS is disconnected when the job runs, mkdir -p can create the destination folder on your computer’s own disk instead. The job then looks successful while no separate backup was ever made. The same thing happens on Windows when the drive letter is reassigned to a different volume. The scripts in Step 4 and Step 6 therefore confirm the destination is present and carries the identifier you stored, and exit with an error if either check fails.
Expected result: You have an empty, clearly named destination folder outside your sync path, you know the exact mount point your script must verify, and the destination carries a unique marker value your script can compare against before copying.
Step 4: Write a Cron Job Backup Script on macOS or Linux
Summary: Build one script that checks the destination is mounted and carries your identifier, then writes a dated copy that no later run can overwrite.
Two patterns cover most freelance projects. The first creates a point-in-time archive with tar. It creates the log folder, verifies the mounted volume and the destination marker value, and refuses to reuse an existing archive name:
#!/bin/bash
set -euo pipefail
PROJECT_DIR="/Users/you/Projects/client-site"
MOUNT_POINT="/Volumes/BackupDrive"
BACKUP_ROOT="$MOUNT_POINT/backups/client-site"
LOG_FILE="/Users/you/Logs/backup.log"
STAMP=$(date +%Y-%m-%d_%H%M%S)
ARCHIVE="$BACKUP_ROOT/project_$STAMP.tar.gz"
# The unique value you wrote into the marker file on the real destination
EXPECTED_TOKEN="paste-your-unique-token-here"
mkdir -p "$(dirname "$LOG_FILE")"
# Abort if the external volume is not mounted
if ! mount | grep -q " on $MOUNT_POINT "; then
echo "[$(date)] ERROR: $MOUNT_POINT is not mounted - backup skipped" >> "$LOG_FILE"
exit 1
fi
# Confirm the mount carries the marker value you stored on the real destination
if [ ! -e "$MOUNT_POINT/.backup-target" ] \
|| [ "$(cat "$MOUNT_POINT/.backup-target" 2>/dev/null)" != "$EXPECTED_TOKEN" ]; then
echo "[$(date)] ERROR: destination marker missing or does not match - backup skipped" >> "$LOG_FILE"
exit 1
fi
mkdir -p "$BACKUP_ROOT"
# Never reuse an existing archive name
if [ -e "$ARCHIVE" ]; then
echo "[$(date)] ERROR: $ARCHIVE already exists - backup skipped" >> "$LOG_FILE"
exit 1
fi
echo "[$(date)] backup start" >> "$LOG_FILE"
tar --exclude='*/node_modules' --exclude='*/.cache' \
-czf "$ARCHIVE" \
-C "$(dirname "$PROJECT_DIR")" "$(basename "$PROJECT_DIR")" \
>> "$LOG_FILE" 2>&1
echo "[$(date)] backup ok -> $ARCHIVE" >> "$LOG_FILE"
The second uses rsync to build dated copy folders. It verifies the mount point with mountpoint, compares the destination marker value, and refuses to reuse an existing folder:
#!/bin/bash
set -euo pipefail
PROJECT_DIR="/home/you/projects/client-site"
MOUNT_POINT="/mnt/nas"
BACKUP_ROOT="$MOUNT_POINT/backups/client-site"
LOG_FILE="/home/you/logs/backup.log"
STAMP=$(date +%Y-%m-%d_%H%M%S)
TARGET="$BACKUP_ROOT/$STAMP"
# The unique value you wrote into the marker file on the real destination
EXPECTED_TOKEN="paste-your-unique-token-here"
mkdir -p "$(dirname "$LOG_FILE")"
# Abort if the NAS mount is unavailable
if ! mountpoint -q "$MOUNT_POINT"; then
echo "[$(date)] ERROR: $MOUNT_POINT is not mounted - backup skipped" >> "$LOG_FILE"
exit 1
fi
# Confirm the mount carries the marker value you stored on the real destination
if [ ! -e "$MOUNT_POINT/.backup-target" ] \
|| [ "$(cat "$MOUNT_POINT/.backup-target" 2>/dev/null)" != "$EXPECTED_TOKEN" ]; then
echo "[$(date)] ERROR: destination marker missing or does not match - backup skipped" >> "$LOG_FILE"
exit 1
fi
mkdir -p "$BACKUP_ROOT"
# Never write into an existing dated folder
if [ -e "$TARGET" ]; then
echo "[$(date)] ERROR: $TARGET already exists - backup skipped" >> "$LOG_FILE"
exit 1
fi
mkdir -p "$TARGET"
rsync -a --exclude='.cache' --exclude='tmp' \
"$PROJECT_DIR/" "$TARGET/" >> "$LOG_FILE" 2>&1
echo "[$(date)] copy -> $TARGET" >> "$LOG_FILE"
What these examples are — and are not: they create dated copies, not hard-link snapshots. Each run writes the files that exist at that moment into a new timestamped folder, and no run ever deletes from a folder created by an earlier run. That is why neither example uses --delete or --link-dest: --delete mirrors the source and would remove files from a reused destination, which is exactly the behavior you want to avoid in a backup. Because nothing is deleted, older folders keep files you have since removed from the project, and storage grows until you prune according to your retention policy. If you want hard-link snapshots that save space while preserving prior states, that is a separate setup you would add deliberately.
Practical rules for both patterns:
- Use variables for
PROJECT_DIR,MOUNT_POINT,BACKUP_ROOT,LOG_FILE, the marker token, and the date stamp. - Use a timestamp with seconds and keep the collision guard, so two runs in the same minute cannot resolve to the same destination.
- Adapt the mount check to your destination. macOS does not include
mountpointby default, so themount | grepform is used there; on Linux,mountpoint -qis the simplest option. For a network share you can also test writability with a small probe file. - Verify the destination’s identity as far as you can, not just its path. The marker-value comparison above catches a mount point that has been replaced by an unexpected volume, and a volume-serial or volume-label comparison works too. None of these checks is a guarantee: a marker file can be copied, and a label can be reused. Treat them as safeguards that make the common failure — a disconnected or reassigned destination — fail loudly instead of silently.
- Always exit non-zero when the destination is unavailable or fails the identifier check, so the failure is visible instead of silently writing to the local disk.
- Create the log directory before the first write, as both examples do with
mkdir -p "$(dirname "$LOG_FILE")". This covers the log the script writes itself; the separate log directorycronneeds is created in Step 5. - Log every run, and exit non-zero on failure so the scheduler can report it.
- Add a lock file or overlap guard so a slow run never collides with the next one.
- Use absolute paths and quote every variable.
- On macOS, grant Full Disk Access to the scheduler or script environment; on Linux, confirm the
cronuser owns or can read the source files. - Run the script manually once before scheduling it.
Expected result: A working script that writes a dated, independent copy on demand — and refuses to run, with a logged error, when the destination is not mounted, does not carry your marker value, or the dated name already exists.
Step 5: Schedule the Cron Job
Summary: Create the cron log directory, then register the script with cron so it runs automatically.
Create the cron log directory first. When cron runs a job, the shell performs the output redirection before it starts your script. If the log directory does not exist, cron cannot open the log file, so the script never runs at all — and creating the directory inside backup.sh cannot help, because the script is never reached. Run this once before installing the job:
mkdir -p /Users/you/Logs
Alternatively, point the redirection at a directory you already know exists, such as your home directory. Once the directory exists:
- Open your user crontab with
crontab -e. - Add an off-hours daily schedule, for example
30 2 * * *. - Redirect
stdoutandstderrto a log file inside the directory you just created. - Set or verify
PATHinside the script, becausecronenvironments are minimal. - Save the file and confirm the job appears in
crontab -l. - Either run the job manually or wait for the next run, then inspect the log.
30 2 * * * /bin/bash /Users/you/Scripts/backup.sh >> /Users/you/Logs/cron.log 2>&1
Remember the division of labor: cron runs the backup; Nutstore syncs the folder. Nutstore is not the scheduler in this workflow.
A note on sleep and shutdown: cron does not run a job that was missed while the machine was asleep or powered off. If your laptop is usually closed at 2:30 a.m., the job simply will not fire that night, and no log entry appears. Keep the computer awake during the scheduled window (or set the schedule for a time it is reliably running), and if you need jobs to run after sleep or shutdown, use a scheduler that supports missed-run catch-up.
Expected result: A log entry appears at the expected time — provided the machine is awake and running at that time. If the computer was asleep or off during the window, the run is skipped rather than queued.
Step 6: Create a Windows Task Scheduler Backup
Summary: Use Task Scheduler as the Windows equivalent of cron, writing each run into its own dated folder and confirming the destination still carries your identifier.
- Open Task Scheduler and create a task with a daily trigger.
- Use a PowerShell script or a
robocopycommand to copy the project folder to your separate backup destination. - Set the “Start in” directory and write output to a log file. The example below creates the log folder if it does not exist.
$src = "C:\Projects\client-site"
$stamp = Get-Date -Format yyyy-MM-dd_HHmmss
$dst = "E:\Backups\client-site\$stamp"
$logDir = "C:\Logs"
New-Item -ItemType Directory -Force -Path $logDir | Out-Null
robocopy $src $dst /E /XD node_modules .cache /LOG+:"$logDir\backup.log"
The example uses /E (copy subdirectories, including empty ones) rather than /MIR. /MIR mirrors the source and deletes files in the destination that are absent from the source, which would erase earlier backups if a destination folder were ever reused. With /E into a fresh timestamped folder, each run produces a dated copy and touches nothing from previous runs. As with the Unix examples, storage grows until you prune old folders. This minimal version has no destination guard, so it assumes the destination is always present.
- Configure the task to run whether the user is logged on or not only if your environment supports that securely.
- Run the task manually once and inspect the log.
Reading Robocopy’s exit code: Robocopy reports nonzero codes even when the copy succeeded. Codes below 8 generally mean success or a nonfatal condition — for example, code 1 means files were copied, code 2 means extra files were detected, and code 3 combines the two. Codes of 8 or higher indicate an actual failure, such as an inaccessible destination. If you want the scheduled task to reflect this accurately, and to guard against a missing or wrong destination and a name collision, wrap the call and map the result:
$src = "C:\Projects\client-site"
$stamp = Get-Date -Format yyyy-MM-dd_HHmmss
$dst = "E:\Backups\client-site\$stamp"
$logDir = "C:\Logs"
$marker = "E:\.backup-target"
# The unique value you wrote into the marker file on the real destination
$expected = "paste-your-unique-token-here"
New-Item -ItemType Directory -Force -Path $logDir | Out-Null
# Confirm the destination still carries the identifier you stored
if (-not (Test-Path $marker) -or (Get-Content $marker -Raw).Trim() -ne $expected) {
Add-Content "$logDir\backup.log" "$(Get-Date) ERROR: destination marker missing or does not match - backup skipped"
exit 1
}
if (Test-Path $dst) {
Add-Content "$logDir\backup.log" "$(Get-Date) ERROR: $dst already exists - backup skipped"
exit 1
}
robocopy $src $dst /E /XD node_modules .cache /LOG+:"$logDir\backup.log"
if ($LASTEXITCODE -ge 8) { exit 1 } else { exit 0 }
Why a marker check replaces a bare drive-letter test: checking only that E:\ exists tells you a volume is present at that letter, not that it is your intended drive or NAS. Windows can assign E: to a different volume — a second internal disk, a USB stick, or a card reader — and the copy would then land on the wrong device while still reporting success. The example above therefore compares a unique value stored in a marker file on the real destination against the value the script expects. If the letter now points at another volume, the marker will normally be missing or will contain a different value, and the job logs an error instead of copying. A volume-serial or volume-label comparison serves the same purpose. Be aware that these are safeguards, not proof: a marker file can be copied onto another volume, and a label can be reused, so the check narrows the risk rather than eliminating it. As on macOS and Linux, the checks run before the copy, so a missing destination, a mismatched identifier, or an existing dated folder produces a logged failure rather than a copy written to an unintended place or into a folder that already holds a backup.
Expected result: A new dated folder appears on the intended backup destination after the task completes, and the task reports success unless a genuine failure occurred — including a destination that is absent or no longer carries your marker value.
Step 7: Test Restore and Failure Alerts
Summary: Prove the backup works before you need it, including what happens when the destination is gone or no longer matches.
- Restore one sample file and one full folder from the backup destination.
- Compare file counts or checksums where practical.
- Confirm the scheduled job actually ran by checking logs and timestamps.
- Disconnect the drive or NAS and run the job again. The script should log an error and exit non-zero, and no new folder should appear on your local disk. Reconnect the destination afterwards.
- Simulate a wrong destination. Remove or change the marker value (or change the volume label), then run the job. It should refuse to copy and log an error rather than writing to whatever occupies that path or letter.
- Simulate other failures — an unavailable destination drive, a read-only destination — and confirm the script or task reports them.
- Confirm that a second run creates a new dated folder rather than writing into the previous one.
- Add a simple alert: email, desktop notification, or a recurring log review reminder.
- Write down the restore steps so future-you can repeat them.
Expected result: You have personally restored real files, and you have confirmed the job fails visibly instead of silently when the destination is missing or no longer carries your marker value.
Step 8: Document and Review the Routine
Summary: Keep the routine honest as your setup changes.
- Record the folder map: which folders Nutstore syncs and which folders your script backs up.
- Record the schedule, retention policy, destination mount point or drive letter, marker value or volume label, and restore steps.
- Note that feature availability can vary by platform and plan.
- Review the routine whenever project folders, devices, or storage destinations change.
- Keep reminding yourself: sync and backup are two separate jobs with two separate purposes.
Expected result: A one-page routine document anyone could follow, including you in six months.
Troubleshooting: When a Backup or Sync Goes Wrong
Quick Answer: If a backup did not appear, check the job’s log file first, confirm the destination is actually present and still carries your identifier, then verify the source and destination paths, permissions, and free space. If sync has propagated an unwanted change or deletion, stop making further changes, then check Nutstore version history or the recycle bin where your plan supports it, and restore from your independent backup if the change cannot be recovered through sync history.
Issue 1: The Scheduled Job Runs but No Backup Appears
- Check the log file first.
- Confirm the destination is mounted. If it is not, the script’s destination check should log an error and exit non-zero; a job with no such check may instead create the destination on your local disk.
- Confirm the destination still carries your identifier. On Windows, a bare drive-letter test does not tell you which device is present — another volume can occupy
E:— so check that the marker value or volume label still matches what you stored. - Verify absolute paths and the
cronor Task Scheduler working directory. - Confirm permissions for the source folder and the destination.
- On macOS, check Full Disk Access for the scheduler or script environment.
- Run the script manually with the same user account.
- Confirm the destination has free space.
Issue 2: The Backup Completes but Restore Is Incomplete
- Check exclusions and retention rules.
- Confirm the backup really landed on the separate destination, not on a local folder created when the drive or NAS was unavailable, and not on a different volume that inherited the same drive letter or label.
- Confirm the job is not skipping locked files or symlinks unexpectedly.
- Verify destination space and write permissions.
- Test restoring a small sample before relying on the backup.
- Keep more than one dated copy, and check that earlier dated folders still hold the files they should.
Issue 3: Sync Propagates an Unwanted Change or Deletion
- Stop making further changes until the situation is understood.
- Check Nutstore version history or the recycle bin where your plan supports it; retention is plan-dependent.
- Look for conflict copies, but do not assume automatic content merging.
- Restore from the independent backup if the change cannot be recovered through sync history.
- Adjust your workflow so sync and backup remain separate.
Frequently Asked Questions
Q1: Is sync the same as a scheduled backup?
No. Sync keeps working copies consistent across supported devices. A scheduled backup creates an independent copy. Sync can propagate changes or deletions, and unsaved or not-yet-uploaded edits are not protected, so sync does not replace backup.
Q2: Does Nutstore run cron jobs or scheduled backups for me?
No. Use your operating system’s scheduler — cron on macOS/Linux or Task Scheduler on Windows — for the backup job. Nutstore syncs the selected working folder; it is not the scheduler in this workflow.
Q3: Can I sync an existing project folder without moving it?
Yes. Nutstore supports arbitrary folder sync: right-click an existing folder to sync it without relocating it or using mklink. Feature availability can vary by platform and plan.
Q4: Does Delta Sync mean every file change is instantly protected?
No. Delta Sync is a PC-client feature and applies only when its file-size and change thresholds are met. Compressed files, images, and videos do not support Delta Sync. It also does not replace an independent backup.
Q5: Can Cloud Bridge Mode help with large working folders?
Cloud Bridge Mode can use local placeholders of about 4 KB, download files on demand, and cap and auto-clean cache space where available. Do not assume availability on every platform, and do not treat it as a backup substitute.
Q6: Can I use WebDAV for cron-based backup?
WebDAV (server address dav.jianguoyun.com/dav/) is an integration option for compatible third-party apps, not a guaranteed cron-based backup mechanism. Paid users have a WebDAV request limit of 1,500 requests per 30 minutes. For scheduled backup, use the OS scheduler and a separate backup destination.
Q7: What happens if my external drive or NAS is disconnected when the backup runs?
A script with a destination check logs an error and exits non-zero, so the job fails visibly and nothing is written to the wrong place. A script without that check may create the destination folder on your local disk and appear to succeed while producing no separate backup.
Q8: Does checking that the destination path or drive letter exists prove the backup went to the right place?
No. A path or drive letter only says something is there, not that it is your intended device — on Windows, for example, another volume can be assigned to the same letter, and on any platform a different volume can occupy the same mount point. That is why the examples compare a unique marker value (or a volume serial or label) stored on the real destination before copying. Even that is a safeguard rather than proof, since a marker file can be copied and a label can be reused.
Q9: Why don’t the examples use --delete or /MIR?
Because those options mirror the source: they delete files in the destination that are absent from the source. In a dated backup that would remove data from a previous copy. The examples instead write each run into a new timestamped folder and delete nothing, which keeps earlier dated copies intact until you prune them yourself.
Summary
To automate backup & sync reliably, run two layers side by side:
- Schedule an independent local backup with
cronor Task Scheduler, and make the script verify its destination is present and still carries the identifier you stored. - Write dated copies, not mirrors — each run gets its own timestamped folder, and no run deletes from an earlier one.
- Sync your working folder with Nutstore arbitrary folder sync, right-clicking the existing folder so nothing moves.
- Test restore and test failure, including a disconnected drive and a reassigned drive letter.
- Keep the roles separate — one job for consistency, one job for safety.
Restating the key caveat: sync can propagate changes and deletions, and unsaved or unuploaded edits are not protected. A backup copy only protects you if the scheduled job runs as expected and the copy is kept separately. Feature availability can vary by platform and plan.
Try Nutstore Today
Ready to put the sync layer in place?
- Set up arbitrary folder sync with Nutstore — right-click any existing project folder, no relocation required.
- Start a 20-day free Team trial — useful if you collaborate with a small team or an independent practice and want shared project folders synced under one structure.
Keep your cron job or Task Scheduler backup running in the background. That combination — an independent scheduled backup plus Nutstore sync — is what lets you stop handling files by hand.
