DB-유

Hyper Backup to an External Drive

· synology, backup, hyper-backup

"It's on RAID, so it's backed up" is the sentence I like least in this job. RAID covers a dead disk. It does nothing for a deleted folder, an encrypted share or a stolen NAS. A USB drive you plug in, back up to and carry somewhere else is the cheapest fix, and Hyper Backup on DSM 6 handles it well, with versioning and integrity checks. Here is my setup on a DS218+ with a 4 TB USB 3.0 disk.

Use a disk big enough for the data plus several versions, and plug it into the blue USB 3.0 port. USB 2.0 is painful for terabytes.

Format the drive

Plug in the drive. Control Panel → External Devices → select it → Format. Choose ext4. NTFS and exFAT work for plain file copies but Hyper Backup's own format needs a filesystem with proper permissions and long filenames, and ext4 is also fastest on the NAS. After formatting the drive appears as a share named usbshare1.

If you want to read the disk on a Windows PC directly, skip Hyper Backup's database format entirely, use the "Single-version" copy type in the schedule step below, and format NTFS instead.

Create the backup task

Hyper Backup → + → Data backup task → Local folder & USB. Select usbshare1 as the shared folder and give the directory a name such as NAS-backup.hbk. On the next screen select the shared folders to include. I exclude #recycle folders and the docker share's @docker internals by leaving them unticked, and include:

homes
photo
documents
docker      (application data, dumped beforehand)

Under Application backup tick the packages whose settings you want captured (for me: Hyper Backup itself, Docker is not supported, Web Station and MailPlus are).

Schedule, integrity check and rotation

On the Backup Settings page:

Task name:                   NAS to USB
Enable task notification:    yes (mail)
Compress backup data:        yes
Enable backup schedule:      daily 01:00
Enable integrity check:      weekly, Sunday 04:00, check data as well
Enable client-side encryption: yes (store the key file off the NAS)

Then on Rotation Settings enable Smart Recycle with a version limit of, say, 30. Smart Recycle keeps hourly versions for a day, daily for a month and weekly beyond that, and deletes the rest when the limit is hit. Do not skip this or the disk will fill within weeks.

Client-side encryption prompts you to download a .key file and shows a password. Save both somewhere that is not the NAS. I keep a copy in my password manager, because a backup you can't decrypt is just a warm drive.

First run and the log

Click Back up now. The first run copies everything and takes hours; subsequent runs transfer only changed blocks. Progress is visible in Hyper Backup's task list and in the log:

sudo tail -f /var/log/synolog/synobackup.log

Eject properly

Pulling the USB cable while Hyper Backup is writing corrupts the target database. Use the eject button on the front of the unit (hold for a moment; the LED blinks), or Control Panel → External Devices → Eject, or from SSH:

sudo synousbdisk -umount sdq1

The device name is shown by df -h | grep usbshare. You can also add a Task Scheduler entry that ejects the disk after the backup, but I prefer to do it by hand when I swap disks.

Two disks, swapped weekly

For real off-site protection I use two external drives and alternate them weekly. Hyper Backup ties a task to one target, so create two tasks pointing at two directory names (NAS-backup-A.hbk, NAS-backup-B.hbk) and let the task whose disk is absent fail quietly; the notification mail tells you which one ran.

Restore something, for real

Hyper Backup → the task → Backup Explorer (the clock icon) lets you browse versions and download or restore single files. Do a test restore of a small file to a different location. Then check the integrity check result under the task's log after Sunday; it should read "Integrity check completed successfully".

To confirm the target really is portable, install Hyper Backup Explorer on a Windows PC and open X:\NAS-backup.hbk on the external disk; it will ask for the encryption password and show the versions.

Failures I've seen

  • The task fails with "Failed to access the backup destination. Please make sure the destination is available": the disk was ejected or remounted under a new name (usbshare2). Relink the task via the task's Target tab, then Relink to existing.
  • "Backup destination is running out of space": Smart Recycle is off or the version limit is too high. Lower it and run a rotation from the task menu.
  • The backup is extremely slow (under 30 MB/s): the disk landed on a USB 2.0 port, or the drive is an SMR model struggling with random writes on the first full copy. Check lsusb -t for the port speed.
  • Integrity check reports "Some data is corrupted": the USB cable or the disk is failing. Do a fresh full backup to a different disk before trusting it again.

One hard drive and a two-minute weekly swap. It isn't glamorous, but it's the backup I'd actually be glad to have.