BackupZit

Back up a NAS or Windows file share (SMB) with versions

A step-by-step guide: back up the shares of a NAS or a Windows file server without installing anything on it, keep a version of every file for each backup, bring back one file or a whole folder, and keep a second copy that ransomware on the network cannot delete.

What you will set up

A NAS / file share job backs up an SMB or NFS share — on a Synology, QNAP or TrueNAS NAS, a Windows file server or any other server — through a BackupZit agent that reaches it. The agent reads the share and writes the backup to a separate storage target; nothing is installed on the NAS. Every run is a restore point, so you keep earlier versions of the files for as long as the retention says. BackupZit is free and open source under the GNU AGPLv3; MaxZit, the company behind it, offers optional paid support.

What you need

  • A BackupZit console: a small Linux VM (2 vCPU, 2–4 GB RAM, 16–20 GB disk) from the ready-made image on the download page, or the install script on an existing Linux server.
  • A Windows or Linux agent on a machine that reaches the share: TCP 445 for SMB; for NFS, the NAS must allow the agent machine's address on the export.
  • For SMB, an account that can read the folders to back up (or guest access). Restores to the original location write onto the share with the same account.
  • A storage target other than the NAS being backed up: a second NAS, an SFTP server, an S3-compatible bucket, Azure Blob Storage, a BackupZit hardened repository, or USB disks.

Step 1 — Pick the agent that reads the share

Any Windows or Linux agent can do it; it does not have to run on the file server. The agent reads all data over the network, so one close to the NAS is the best choice — for example a server in the same rack, or a Proxmox VE node, which has the SMB and NFS tools already.

  • Windows agents open the share through its UNC path (\\nas01\data), SMB only.
  • Linux agents mount it read-only below /mnt/backupzit-nas for each run: SMB needs cifs-utils, NFS needs nfs-common (Debian, Ubuntu) or nfs-utils (AlmaLinux, Rocky Linux). NFS shares therefore need a Linux agent.
  • Mac agents do not connect shares yet.

An agent runs one job at a time by default. If it backs up several shares, allow more under Jobs at once on the Agents page (up to 8), step by step, since the runs share its CPU and network.

Step 2 — Decide where the backups go

A backup on the same NAS is lost with it. Under Storage → Add storage target, add a target on another device: an SMB share or SFTP server on a second NAS, S3 or Azure off-site, or a hardened repository. Keep Encrypt backups (AES-256) on — the agent encrypts the data before it leaves the machine — and store the Recovery key or the recovery sheet apart from the backups.

When the console runs elsewhere, for example on a VPS, and the storage is on the local network, test the target from an agent at that site and tick Reachable by agents only: the console then never connects to the storage, while backups, restores, restore tests and retention run on the agents as always, and browsing files goes through an agent (agents 0.61 or newer). Let the console connect turns it off again.

Step 3 — Create the share job

  1. Open Backup jobs → New backup job, choose the Agent from step 1 and the Storage target from step 2, and select NAS / file share.
  2. Share: smb://nas01/data, optionally with a folder (smb://nas01/data/Office), or nfs://nas01/volume1/data with the export path. A Windows file server's \\fs01\Projects is smb://fs01/Projects.
  3. For SMB, Username, Domain (for domain accounts) and Password, stored encrypted; empty means guest access. NFS uses the agent machine's own access to the export.
  4. Folders in the share: one per line, relative to the share, for example Projects or Scans/2026; empty backs up the whole share.
  5. Exclude: one name pattern per line, for example #recycle, @eaDir, .snapshot or *.tmp, so recycle bins, NAS index folders and snapshot folders are not backed up again.
  6. Set Keep backups and the Schedule (step 4) and click Create job. Run backup now starts the first, full backup.

For each run the agent connects the share and disconnects it afterwards. Runs on the same share at the same time use one connection; a run that connects differently, such as a restore that connects the share writable, waits until the others are done (agents 0.63 or newer). The backups are ordinary file backups: incremental, deduplicated and compressed, with retention, copy jobs, restore tests, browsing and file restores.

Step 4 — Versions: schedule and retention

Each successful run is a version of the share that can be restored. How many versions there are depends on two settings:

  • Schedule: At specific times (up to three times a day), or Repeatedly, every few hours or minutes — for example every 2 hours between 08:00 and 18:00, Monday to Friday, for several versions per working day (intervals from 15 minutes to 12 hours). Backup window: start only between keeps scheduled runs inside the hours you choose.
  • Retention under Keep backups: a backup is kept if any rule selects it — Most recent, Daily, Weekly, Monthly and Yearly (agents 0.62 or newer). With 3 recent, 7 daily, 4 weekly and 6 monthly you have about half a year of history with about 20 restore points. Unchanged files are stored only once, however many versions refer to them.
  • RPO: Recovery point objective (RPO), hours warns on the dashboard and by notification when the newest good backup gets older than that — also when the NAS was unreachable for days.

Restore files and folders

  1. Find the version: the job page lists the runs, and the Calendar shows which backups ran on which day. Or use Restore → Files and folders in the menu, then the job and the restore point.
  2. Browse files on the run shows the share as it was. Tick files and folders, then Download — one file as it is, several as a ZIP, straight in the browser; the audit log records the paths — or restore them on an agent.
  3. Under Restore files from this backup, choose where:
    • Restore to original location (overwrites existing files): the agent connects the share again, writable, and writes the files back onto it;
    • Restore into a folder on any agent, for example D:\Restore: the original structure is recreated below it, nothing existing is touched;
    • Only these paths limits the restore to some folders or files, for example Projects/Offer-2026.docx.
  4. Keep Verify restored files on, so each file is read back and compared with its checksum, and click Start restore.

Users with a restore role can browse and download without administrator rights, so a lost document can be found without restoring a whole folder.

Ransomware and a second copy

A share that every PC can write to is a typical target. BackupZit compares every backup with the history of its job and marks it as suspicious when far more files changed than usual, the new data no longer compresses (encrypted files look like random data), the number of files suddenly dropped by a third or more, or the new data jumped. It then sends an alert, shows the backup on the dashboard and pauses the job's retention: no older backup is removed, so the last clean versions stay. Copy jobs that run after each backup wait as well. After checking, Reviewed — resume retention on the job page releases it.

SMB shares, SFTP servers and local disks have no immutability of their own: an attacker with write access could delete the backups on them. Add a second copy:

  • A Backup copy job with After each backup of the source job copies new versions to another storage target; only data that is not there yet is transferred, and the copy has its own retention, for example 7 daily on the second NAS and 12 monthly off-site.
  • For immutable copies use S3 with Object Lock (Immutable backups (S3 Object Lock, compliance mode) for N days) or a BackupZit hardened repository; nobody can delete or overwrite them before the period ends.
  • Rotating USB disks (BZBACKUP1, BZBACKUP2…) give small offices an offline copy.

Copied file backups are restored from the copy like the originals. The 3-2-1 guide describes the storage side step by step.

Restore tests and monitoring

  • Automatic restore tests (weekly by default, Settings → Restore tests): the agent restores a random sample of files from the newest backup into a temporary folder, checks every byte against the stored checksums and deletes it again. Test restore on the job page runs one now.
  • Run reports: number of files, new and changed files, data read and new data stored. Files that could not be read are listed and make the run a warning; the rest of the share is backed up.
  • Notifications by email, Slack, Microsoft Teams or webhooks for failed runs and missed RPOs; Storage usage shows how the backup storage grows and, for storage with a known size, when it will be full.

A Windows file server: share job or agent on the server?

For a Windows file server there are two ways, and both are fine:

NAS / file share jobAgent on the server, Files and folders job
Install on the serverNothing; another machine's agent reads the shareThe Windows agent
Open filesRead as they are over SMBRead from a VSS snapshot, so open files are backed up consistently
Whole serverOnly the share's filesA Disk image job on the same agent adds bare-metal restore

A NAS normally cannot run the agent, so for a NAS the share job is the way. For a Windows server you manage, the agent on the server adds VSS and disk images; see the Windows bare-metal restore guide.

Limits

  • Share jobs run on Windows and Linux agents; Mac agents do not connect shares yet. Windows agents read SMB only, NFS needs a Linux agent.
  • The share is read over the network without a snapshot: a file that changes during the backup is read as it is at that moment. For databases on a server use a Databases job on that server.
  • Windows file backups do not keep NTFS permissions: restored files take the permissions of the folder they are restored into. Set the permissions of a restored folder on the NAS or file server yourself.
  • There is no deduplication between different agents: each agent has its own repository on the storage target.
  • Immutability comes from the storage: S3 Object Lock or the hardened repository. You bring the storage; MaxZit hosts none.
  • The console and its guide come in 14 languages; paid support is provided in English only.

Next steps

Download BackupZit, see the NAS share and storage features, or read the chapters Backup jobs & schedules, Storage targets and Restoring in the user guide in the console. Related guides: 3-2-1 backup with immutable copies, a NAS as storage or source and Linux server backup. Questions are welcome in GitHub Discussions; companies can get commercial support from MaxZit (in English).

Synology, QNAP, TrueNAS and Windows are trademarks of their owners. BackupZit and MaxZit are not affiliated with them; the names are used only to describe what BackupZit works with.