Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

Designing a business NAS around access, backups and recovery

An engineering firm keeps active CAD jobs on a NAS. A supplier puts a drawing into an upload area, designers work on it and reviewers read the approved copy. The firm also needs to recover a drawing after an accidental o

An engineering firm keeps active CAD jobs on a NAS. A supplier puts a drawing into an upload area, designers work on it and reviewers read the approved copy. The firm also needs to recover a drawing after an accidental overwrite and reopen active jobs if the NAS goes down.

Those requirements drive the storage and software choices. An off-the-shelf NAS with directory groups and working file versions may already cover much of the job. A supplier upload area and independent recovery storage can be added around those services. Capacity, compatibility and the time available for recovery determine how far the system needs to change.

File shares and the management plane

The SLX NAS software base runs on Debian. Samba exposes SMB3 shares and POSIX ACLs define permissions on directories and new files. The design group can write to the working area. Reviewers can read it. If a company uses Active Directory, Samba can integrate with company groups so an identity change is made in the directory the IT team already manages.

The management console uses React and TypeScript. A Go API with limited privileges handles requests. A separate local agent carries out authorised operations on volumes, shares and services. SQLite stores configuration and the activity record. Caddy handles HTTPS and systemd schedules service operations.

The reference Samba configuration requires SMB3 encryption. Management and backup accounts have separate roles. The console supports TOTP and the design can add WebAuthn hardware keys. For incident response, an administrator can request suspension of managed shares, the document portal and backup jobs. The hold persists across a restart, and the person handling the incident checks the service status before reopening access.

A supplier upload and a previous drawing revision

An expiring Nextcloud link with upload-only access gives the supplier a place to deliver the drawing. The project lead reviews the upload before moving it into the working area. If the browser portal and SMB clients need access to the same archive, decide where writes happen and how the portal will see changes made outside it.

With a snapshot-capable file system and the matching Samba configuration, Windows users can open Previous Versions on the share. Snapshot intervals determine the versions they can see. Retention affects space usage as older snapshots hold blocks from modified or deleted files. An OpenZFS dataset quota can include snapshots, while a referenced quota can cap the live dataset’s referenced space.

A recovery path that can run on another server

Restic keeps encrypted, versioned backups on an independent destination. The recovery material includes the shares, directory and access information, service configuration and application state. A Nextcloud restore also needs data and database records from the same recovery point. A directory tree alone leaves out settings, accounts and shares that the database and configuration hold.

There are two separate storage decisions. The first is how long to keep recovery points. The second is which destination and credentials will be available if the NAS is inaccessible. A second server over SFTP or S3-compatible storage can provide an independent location. If the design uses object retention, verify that repository maintenance and restore procedures work with the retention policy.

A recovery point objective sets the tolerable amount of lost work, measured in time. A recovery time objective sets the target for service to come back. At an effective 100 MB/s, moving 4 TB alone takes just over 11 hours. Restoring permissions and applications takes additional time. Prioritising active CAD jobs before historical data gives the restore a sequence that follows the work.

The full walkthrough, including a table for assessing an existing NAS and notes on replication and UPS shutdown, is available here. Custom NAS software for businesses

AI assisted the drafting and English editing of this article. The technical details draw on the SLX NAS project documentation and the linked software documentation.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.