wireguard-manager icon indicating copy to clipboard operation
wireguard-manager copied to clipboard

How does the backup works?

Open Gill-Bates opened this issue 3 years ago • 9 comments

I want to reinstall my VM and for this I need to backup the configuration in advance.

I start the script and select No. 10

What do you want to do?
   1) Show WireGuard
   2) Start WireGuard
   3) Stop WireGuard
   4) Restart WireGuard
   5) Add WireGuard Peer (client)
   6) Remove WireGuard Peer (client)
   7) Reinstall WireGuard
   8) Uninstall WireGuard
   9) Update this script
   10) Backup WireGuard
   11) Restore WireGuard
   12) Update Interface IP
   13) Update Interface Port
   14) Purge WireGuard Peers
   15) Generate QR Code

All what I get is following output:

adding: wg0.conf (deflated 53%)

It would be awesome, when the Output is like

Backup completed. File is located here: /var/backups/20220720_wireguard-manager.zip

and finally: where can I find the password that is generated here?

        BACKUP_PASSWORD="$(openssl rand -hex 50)"
        echo "${BACKUP_PASSWORD}" >"${WIREGUARD_BACKUP_PASSWORD_PATH}"
        zip -P "${BACKUP_PASSWORD}" -rj ${WIREGUARD_CONFIG_BACKUP} ${WIREGUARD_CONFIG}

Gill-Bates avatar Jul 20 '22 10:07 Gill-Bates