[BUG REPORT] Backups to Google Drive are empty

Started by erwinvanlonden, June 19, 2025, 02:45:37 AM

Previous topic - Next topic
I've configured a backup schedule to have the xml stored on a Gdrive and the process itself seems to work with the exception that the xml file itself is empty.

The file is created with the name and timestamp in the correct folder but having an empty file doesn't really help..

Anyone an idea what may be causing this?

Type opnsense
Version 25.1.8_1
Architecture amd64
Commit 74f397e13
Mirror http://mirror.sfo12.us.leaseweb.net/opnsense/FreeBSD:14:amd64/25.1
Repositories OPNsense (Priority: 11)
Updated on Fri Mar 7 01:36:53 AEST 2025
Checked on N/A

A few things you can check:

- Encryption Password Mismatch
If you've set a password for encrypting the backups in OPNsense, but it's missing or incorrect during the backup process, the system may still create the file but fail to write the actual config data. Double-check that the password is set and confirmed correctly in System → Configuration → Backups.
- Service Account Permissions
Make sure the Google Drive folder is shared with the service account email (not just your personal Google account). The service account must have Editor access to the folder, or it won't be able to write the file contents—even if it can create the file shell.
- P12 Key or Client ID Issues
If the P12 key is invalid, expired, or mismatched with the service account, authentication may partially succeed (enough to create a file) but fail silently when uploading the actual data. Try re-generating the key and re-uploading it to OPNsense.

Someone else filed a bug in git hub but not sure if it's due to the above or an actual bug.  Mine are backing up fine, I just had one go last night and I'm on the latest version.
https://github.com/opnsense/plugins/issues/4731
OPNsense 25.1.9 running on:
Dell Optiplex 3050
Intel I5-7600 @ 3.5Ghz (4 Cores)
Intel I350-T4 Nic
8G DDR4
256G SSD

Hello axsdenied,

Thank you for your hints. I've started again from scratch and have it working now. I guess your first tip may have resolved this issue and I have a feeling it could've been a copy&paste issue.

Anyway, issue seems to be resolved now.

Regards
Erwin

I was under the impression that this functionality was deprecated by Google, so have changed my backup method to Oxidized.

Quote from: Isabella Borgward on June 23, 2025, 06:53:51 PMI was under the impression that this functionality was deprecated by Google, so have changed my backup method to Oxidized.

It's going to be and I believe a plugin is what will be suggested.

https://github.com/opnsense/core/issues/8343
OPNsense 25.1.9 running on:
Dell Optiplex 3050
Intel I5-7600 @ 3.5Ghz (4 Cores)
Intel I350-T4 Nic
8G DDR4
256G SSD