Backup sets

A backup set is one job: a group of sources, a single destination, and a schedule. You can have as many sets as you like - for example one for Documents to a cloud bucket and another for a Photos drive to a local disk. A set has exactly one destination, so to keep both a local and a cloud copy (the 3-2-1 approach) you create two sets for the same folders.

Choosing what to back up

In the set editor, add the files and folders this set should protect. You can browse your drives and tick individual files or whole folders, and mix as many as you like in one set - they do not have to be on the same drive.

  • Folders are included recursively. Selecting a folder backs up everything inside it, including subfolders, now and as new files appear later.
  • Open and locked files are captured. Nyx Backup takes a point-in-time snapshot of the source, so a file being written to - a database, a document you have open - is backed up cleanly and consistently, not half-written.
  • Read access is required. The background service must be able to read a source to back it up. On macOS that can mean granting Full Disk Access for protected locations - see Troubleshooting.

Pick the folders that hold work you could not recreate - documents, photos, projects, mail stores - rather than the whole system disk. Applications and the operating system are reinstallable; your files are not.

Exclusions

Keep junk and secrets out of a set two ways:

  • Excluded paths - specific folders or files inside your sources to skip.
  • Excluded patterns - glob patterns matched against paths, such as *.tmp, node_modules, or */Cache/*.

Exclusions win over inclusions: anything matched is skipped even if it sits inside a selected folder. Sensible system exclusions (caches, temp directories, virtual-memory and trash locations) are applied automatically for each operating system, so you do not have to list them yourself.

Fixed vs removable drives

Mark a set’s source as removable when it lives on a drive that is not always attached - an external disk or a USB stick. Nyx Backup then treats “the drive is not connected” as expected rather than a failure, and backs the set up when the drive reappears.

Cloud files (online-only files)

Files your cloud provider keeps online-only - iCloud Drive, OneDrive Files On-Demand, and similar - show up on disk as placeholders with no contents. Turn on Back up cloud files for a set to have Nyx Backup materialize each placeholder just long enough to back up its real contents. Files that have not changed since the last backup are not re-downloaded, so this stays light on bandwidth.

Advanced options

Most people never touch these - the defaults are tuned automatically. They live under the set editor’s advanced area.

Pre, post, and failure scripts

A set can run a script around each backup. For security, a script is referenced by filename, not typed in as a command: the background service runs with high privileges, so it only ever runs scripts an administrator has placed in the approved hooks folder.

  • Windows: C:\ProgramData\NyxBackup\hooks\
  • macOS: /Library/Application Support/NyxBackup/hooks/
  • Linux: /etc/nyxbackup/hooks/

An administrator drops a vetted script there (example scripts ship in the examples/ subfolder), and you select its filename in the set’s pre, post, or failure slot. There are three slots:

  • Pre - runs before the backup. If it exits non-zero, the run is aborted before any data is touched (use it to quiesce or dump a database first).
  • Post - runs after a successful backup. A non-zero exit is logged but does not fail the run - the snapshot is already saved.
  • Failure - runs after a run that failed. Use it to send an alert (email, SMS, or a chat webhook) - this is the intended way to wire up notifications.

Each script inherits the service environment plus these variables:

VariableMeaning
NYX_SET_NAMEThe backup set’s name
NYX_SET_IDThe backup set’s ID
NYX_PHASEpre, post, or failure
NYX_SNAPSHOT_IDThe new snapshot’s ID (post only)
NYX_STATUSsuccess or failure
NYX_FILESFiles uploaded this run (post only)
NYX_BYTESBytes uploaded this run (post only)
NYX_ERRORHuman-readable error message (failure only)
NYX_ERROR_CODEClassified error code, e.g. auth_expired (failure)

A script that runs longer than the timeout (5 minutes by default, configurable per set) is stopped.

Performance tuning

Chunk sizes, upload workers, compression level, and file workers. Leave these on automatic unless you have a measured reason to change them - Nyx Backup picks values from your available memory and CPU at the start of each run.

Other per-set settings

  • Full re-scan interval and schedule / retention - see Scheduling and retention.
  • Backup priority - Normal runs at full speed; Background yields to your other work and is gentler on a busy machine but slower.
  • Missed-backup alert - warn if the set has not succeeded in N hours.

Editing a set

Open a set to change any of the above. If you point the set at a different destination, see the note in Connecting storage.