NB: these instructions are for Ubuntu; they work under WSL on Windows 10 as well
Get the decrypt.sh
file from here: https://github.com/zhangyoufu/unifi-backup-decrypt
Make sure prerequisites are installed:
sudo apt update && sudo apt install zip unzip openssl mongo-tools
Then put your .unf backup file somewhere convenient (for our example, we'll assume it's in the home directory and named backup.unf
):
bash decrypt.sh ~/backup.unf ~/backup.zip
mkdir backup
cd backup
unzip ~/backup.zip
gunzip db.zip
bsondump db.zip > db.json
This will:
- convert the .unf into an unencrypted .zip file,
- unzip that into the
backup
directory, - uncompress the backup database
- convert the backup databse from "binary JSON" (bson) to plain text JSON
You can then see the contents of the backup database with any JSON-aware tool or simply read it in a text editor.