Introduction
Data loss remains one of the most critical risks for IT professionals, developers, and home-lab enthusiasts alike. While cloud solutions exist, nothing beats the control, speed, and privacy of backing up directly to your own Network Attached Storage (NAS). This guide walks you through a step-by-step process to configure rsync-based backups from our Ubuntu machine to our ASUSTOR NAS.
Key Takeaways
- Reliable, Native Tooling: Leverage
rsync, a fast, widely-used Linux utility for efficient file synchronization. - NAS as a Backup Server: Configure your ASUSTOR NAS as an rsync-compatible backup server, pulling data from your Ubuntu machine.
- Incremental & Secure: Enable archive mode for block-level incremental backups, compress data to save bandwidth, and password-protect the transfer.
- Automation Ready: Schedule regular backups using ASUSTOR’s Backup & Restore app, or use command-line scripts for full control.
- Metadata Preservation: Keep critical file attributes like permissions, ownership, and timestamps intact during backup.
Step-by-Step Guide: Back Up Ubuntu to ASUSTOR NAS
Based on ASUSTOR’s official knowledge base (updated December 2025), the core method involves enabling the rsync daemon on your Ubuntu machine, then creating a remote sync job on the NAS. Below is the modern, secure approach for current Ubuntu releases (20.04 LTS and later).
Part 1: Prepare Your Ubuntu Machine (Rsync Server)
Modern Ubuntu uses systemd, so the init script method mentioned in older guides is replaced by a service configuration. Follow these updated steps:
- Install rsync (if not present):bashsudo apt update sudo apt install rsync
- Create the main configuration file:bashsudo nano /etc/rsyncd.confPaste the following template, adjusting paths and IPs:iniuid = your_username gid = your_username address = 0.0.0.0 port = 873 hosts allow = 192.168.1.0/24 # Your local network range max connections = 5 [ubuntu_backup] path = /home/your_username/important_data comment = Backup from Ubuntu read only = yes auth users = backup_user secrets file = /etc/rsyncd.secrets
- Create the secrets file (store credentials):bashsudo nano /etc/rsyncd.secretsFormat:
username:password(e.g.,backup_user:SecurePass123)
Set strict permissions:sudo chmod 600 /etc/rsyncd.secrets - Enable and start the rsync daemon:bashsudo systemctl enable rsync sudo systemctl start rsyncVerify with:
sudo systemctl status rsync
Part 2: Configure the ASUSTOR NAS to Pull the Backup
Now, log into your ASUSTOR NAS’s ADM (ASUSTOR Data Master) interface.
- Navigate to Backup & Restore > Remote Sync.
- Create a new backup job:
- Click Create > Remote Sync job.
- Server type: Select
Rsync-compatible server. - Transfer mode: Choose
Remote server -> Your NAS(you are pulling from Ubuntu).
- Enter Ubuntu server details:
- Server IP:
172.16.12.235(your Ubuntu machine’s IP) - Port:
873 - Module:
ubuntu_backup(the name inside[brackets]in your rsyncd.conf) - Username & Password: Use
backup_userand password from thersyncd.secretsfile.
- Server IP:
- Set source (Ubuntu) and destination (NAS) folders:
- Source: Corresponds to the
pathdefined in rsyncd.conf (e.g.,/home/your_username/important_data). - Destination: Choose or create a shared folder on the NAS (e.g.,
/Backups/Ubuntu_Workstation).
- Source: Corresponds to the
- Configure advanced options (critical for efficiency):
- ✅ Archive mode (incremental backup): Strongly recommended. Only changed blocks of files are transferred after the first full backup.
- ✅ Compress data during transfer: Reduces network load, ideal for large files.
- ✅ Keep file metadata: Preserves permissions, ownership, and timestamps.
- ☐ Support sparse files: Only enable if backing up VM disk images or database files.
- Schedule the backup: Choose periodic (daily, weekly) or manual. For production systems, a daily incremental backup is standard.
- Finalize: Name the job (e.g., “Ubuntu_Work_Backup”) and finish. The NAS will now honor the schedule.
Alternative Method: Command-Line Push from Ubuntu
If you prefer initiating backups from Ubuntu using a script or cron job, ASUSTOR’s guide also provides an example:
bash
rsync -av /home/your_username/Documents/ rsync://backup_user@172.16.13.2:873/ubuntu_backup/
- Flags:
-a(archive, preserves metadata),-v(verbose). - Authentication: The rsync client will prompt for the password defined in
/etc/rsyncd.secrets. You can automate this using the--password-fileoption (secure permissions required).
To schedule this, add the command to a cron job (crontab -e), for example, daily at 2 AM:
cron
0 2 * * * rsync -av /home/your_username/ rsync://backup_user@172.16.13.2:873/ubuntu_backup/ --password-file=/etc/rsync_pass
Troubleshooting & Best Practices
- Firewall: Ensure port 873 (TCP) is open on your Ubuntu machine:
sudo ufw allow from 192.168.1.0/24 to any port 873 proto tcp - Permissions: The
rsyncd.confuid/gidmust have read access to the source directories. - Test First: Run the remote sync job manually from ADM without schedule to verify credentials and connectivity.
- Monitor Space: Enable NAS email alerts to avoid filling the backup volume.
Conclusion
Integrating Ubuntu backups with an ASUSTOR NAS using rsync provides a professional, efficient, and secure solution. By following this guide, you leverage:
- Reliability of a time-tested Linux tool.
- Efficiency via incremental block-level backups and compression.
- Control through on-NAS scheduling or client-side cron jobs.
- Integrity with full metadata preservation.
Whether you’re protecting a developer workstation, a home media server, or a small business file share, this setup ensures your data resides safely on your own hardware, accessible instantly. Implement these steps today, and eliminate the “what if” from your data management strategy. For further reading, explore ASUSTOR’s Backup & Restore documentation and the man rsync page for advanced tuning. Your future self—with intact files—will thank you.