How do I get back earlier copies of a QNAP's settings?
The firmware makes a copy of the settings every week and before an update, and keeps it in the hidden folder .@backup_config on the default volume. You can also set your own backup schedule in the panel. You can look at one file from them. Restore a running system from the panel, which knows its version and asks what to restore.
Topic: System and sign-in
Steps to restore from the panel
- Open Control Panel → System → Backup / Restore → Backup/Restore Settings.
- Under Restore System Settings press the restore button and choose a file from your computer or Select file on current device.
- shared folder, folder udostępniony
A folder of a volume that users open over the network.In the wizard skip the parts you do not want to change. Skipping accounts also skips shared folders.
The .bak copies in .@backup_config have a different format from the file the panel makes. We did not check whether the panel accepts them directly.
Steps to look at one file over SSH
- Connect as root (How do I connect to a QNAP over SSH?). Find the default volume and the list of copies:
V=$(getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info) ls -la "$V/.@backup_config"A file is named by number and date, for example
0_20261125_0304.bak. The number0is the newest copy. K=$(mktemp -d /tmp/copy.XXXXXX) && cd "$K"A
.bakcopy is an archive with a password. The command that unpacks it is not given here. The next steps are for the.tar.gzfile unpacked into this folder.tar -tzf 0_20261125_0304.tar.gz | head tar -xzf 0_20261125_0304.tar.gz etc/config/smb.conf- Compare it with the current one without replacing anything:
diff etc/config/smb.conf /etc/config/smb.conf. - Delete the folder:
cd / && rm -r "$K".