donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python w/ Flask
https://donaldzou.github.io/WGDashboard-Documentation/
Apache License 2.0
1.47k stars 217 forks source link

ability to export / import / backup database #273

Closed barryboom closed 1 month ago

barryboom commented 4 months ago

Is your feature request related to a problem? Please describe. Not related to an issue but think it would be helpful and good practise for backing up DB and allowing import /export so you port your WG instance to a new server or if your server becomes corrupt etc.

i have migrated WG instances several times from one server to another made easier by having the endpoint being a DNS adddress rahter than server IP. I currently use winscp to go on and backup the neccasery files and copy to my GDrive. This means i can wipe rebuild my server and restore files and have a fresh install of Ubuntu and not have to change all my client config files. i can also if i want move to another server / provider and restore the files to the new server change the IP address on the DNS A record and all clients can reconnect.

Describe the solution you'd like

a built in option within the DB to backup by way of exporting saving down to local machine

once server rebuilt and WG reinstalled and WG dashboard reinstalled import the local backup and restore previous WG instance.

DaanSelen commented 3 months ago

a built in option within the DB to backup by way of exporting saving down to local machine

Do you mean built-in to the DataBase or DashBoard? As far as I know, there should be a sqlite .db file in src/db/.

barryboom commented 3 months ago

dashboard

donaldzou commented 1 month ago

This is addressed in #293