perara / wg-manager

A easy to use WireGuard dashboard and management tool
MIT License
594 stars 74 forks source link

Where are configuration files installed. #21

Closed Corruptsector closed 4 years ago

Corruptsector commented 4 years ago

Thanks for the Gui, Ive tried a couple and this one works the best for my needs.

I was having some issues with the docker install so installed onto bare metal, but now need to make a backup of all the configurations. Where are they saved? I have looked through the files and cannot find the client and server files.

Thanks

perara commented 4 years ago

Hi,

The configurations are not directly stored as files, but in a SQLITE database. What you can do is to export the whole server, and it should give you a zip with the corresponding configurations for the server and the hosts.

I'm in process of planning a API which would make this process a bit more clear. (and better)

Corruptsector commented 4 years ago

Excellent. I found the database.db file. My next question is i want to run your function that extracts all the data out of the DB and saves into files so i can make daily backups and ship off. Is that done in node somewhere? Sorry its that's a very n00b question.

perara commented 4 years ago

Hi, not a noob question. Atm there is no direct way to export. What you can do is to use selenium to do a dowload, but an api is in the works, will however take a few weeks. I suggest that you, for now just backup the sql database. It contains all the data :)

perara commented 4 years ago

Hi,

I've now implemented the requested feature. In order to dump, you must be authenticated, meaning you must first login then use the Bearer token to get the dump file. The dump is a zip containing all server and peer configuration with the following naming convention: wg-manager-dump-{date}.zip

Please feel free to reopen the issue if there are any problems :)

http://localhost:8000/docs#/wg/dump_database_api_v1_wg_dump_get

perara commented 4 years ago

Also added API-Key support. see the readme.md