Back up a network share
From 1.1.5 a backup set can back up a shared folder on another computer - a Windows PC, a NAS, a Mac - over SMB (also called CIFS). Nothing needs to be installed on that computer: Nyx Backup connects to the share when a backup starts, reads it, and disconnects when the backup ends.
This page is about backing up the files that are on a share. To keep your backups on a share instead, see SMB / CIFS.
Add a share to a backup set
- Open the backup set’s Sources and choose Add Network Share.
- Enter the Address, as
smb://computer/shareor\\computer\share. Add a folder to back up only part of the share:smb://office-pc/Shared/Accounts. - Enter the User name and Password of an account that may read the share. Leave the user name empty to connect as a guest, if the share allows that.
- Choose Test connection. “Connected: the folder can be read” means the backup will be able to read it.
- Save the set.
The share appears in the set’s sources beside its folders, and exclusions work on it the same way.
What happens at each backup
- Read-only. The share is connected read-only. Nyx Backup never changes, moves or deletes anything on it.
- Connected only while backing up. It is connected when the backup starts and disconnected when it ends, whether the backup succeeds, fails or is cancelled. If the service is stopped mid-backup, it cleans up the connection the next time it starts.
- The password stays with the service. It is kept in the service’s own credential store, never in the configuration file, and never appears on a command line or in a log.
- Every file is checked each time. Nyx Backup cannot watch another computer’s files for changes, so each backup lists the whole share and compares sizes and modification times. Only changed files are read and uploaded, but listing a very large share takes a while.
- No snapshot. A snapshot of another computer’s disk is not possible, so the share is read as it is. A file that changes while it is being read is read again.
When the computer is off
If the computer is off, asleep or on another network when a backup runs, the share is skipped for that backup and the set says so. Its files are not recorded as deleted: the next backup that reaches the share carries on from the last one. A wrong password is reported as a sign-in failure, naming the share.
Restoring
Snapshots show a share’s files under its address, for example
smb://office-pc/Shared/Accounts/..., so you can always tell where they came
from. They restore to a folder on this computer, like any restore. Restoring
straight back onto the share is not available yet.
On each system
- Mac: nothing to install. The share is connected out of sight, in a folder only the service can reach, so it does not appear in Finder.
- Windows: nothing to install. Windows allows only one sign-in per computer name, so when two shares on the same computer use different accounts (or a share and an SMB destination do), Nyx Backup connects the second through the computer’s network address. If you typed the address as an IP number, use the computer’s name instead, or the same account for both.
- Linux: needs the
cifs-utilspackage (sudo apt install cifs-utils). Without it, Test connection says this computer cannot connect to network shares.
Not covered yet
- Only SMB / CIFS shares; not NFS.
- Signing in with a user name and password, or as a guest; not with a Windows domain account through Kerberos.
- File contents, names, sizes and times are backed up; a share’s owners and permissions are not restored.