OKNote
Bermula

UGREEN NAS backup and recovery guide

This guide covers UGREEN installations of OKNote 4.1.0 or later with database encryption. When updating, keep the existing data and app configuration directories.

If OKNote prompts you to encrypt your notes, an administrator can use the time estimate to choose Encrypt now or Later. Notes remain available if you choose Later, and the prompt returns the next time you open OKNote. Once encryption starts, the web page shows migration progress and steps, then returns to OKNote automatically when finished. If the update opens the maintenance page directly, let the migration finish.

Restore the installation and all local OKNote accounts

A full restore preserves the local OKNote accounts, roles, and data ownership recorded at the time of the backup. The UGREEN NAS administrator can perform the recovery without signing in to OKNote. Once the service is back, each user signs in with their original OKNote credentials. UGREEN manages its own UGOS accounts separately.

Back up while the original NAS is available

  1. Sign in to the original NAS’s OKNote web app as an administrator and open Settings → Storage → Encryption and recovery keys.
  2. Select Download key recovery file. Verify your current administrator password and set a recovery passphrase of at least 12 characters. Save oknote-recovery.okkey on another device and keep the passphrase separately.
  3. Stop OKNote before copying the entire data directory selected at installation, including hidden files, note bodies, revision history, and attachments. If available, back up the original app configuration directory separately. The recovery file unlocks the data. Automatic .db backups cover the database. The other files in the data directory are needed to restore complete notes.

Restore after a move or reinstall

  1. Install an encryption-capable OKNote version on the destination NAS and select the original data directory or a complete restored copy. Use a separate directory if the destination already holds another OKNote installation’s data.
  2. If you have a matching app configuration backup, restore it and start or restart OKNote. If the configuration is missing, start with the original data directory and leave the container running on the maintenance screen. Place oknote-recovery.okkey in that directory next to oknote.db.
  3. Open the interactive terminal inside the OKNote container in UGREEN Docker. Run the command below and enter the recovery passphrase you chose when downloading the file. The terminal hides the passphrase as you type.
node /app/dist/ugreen-keys.js restore

After the success message, restart OKNote and sign in with the original account. Open a few existing notes and attachments, then search for a word from a note body. Move the recovery file back to separate storage. Encrypted data cannot be unlocked if both the original app configuration and a usable key recovery file are lost. Your sign-in password cannot substitute for the recovery passphrase.

Import one account’s data

  1. On the original NAS, sign in to the source account and open Settings → Export & Backup. Choose the modules and bookshelves to include, set a backup password of at least eight characters, and save the encrypted .oknote export.
  2. On the destination NAS, sign in to the account that should receive the data. Create the account first if needed. To move several accounts individually, export and import a separate file for each account.
  3. Open Settings → Export & Backup → Restore from backup. Select the file, enter the password set during export, and select Restore. Check the import totals and open a few notes and attachments.

Personal imports merge with the destination account’s data and skip records with matching IDs. A full backup preserves the accounts themselves and their trash. Personal exports cover the items you selected. Check the per-attachment size limit before exporting.