pyronear / pyro-api

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL
Apache License 2.0
21 stars 9 forks source link

feat: backup db content locally and copy sql file to s3 bucket #271

Open blenzi opened 1 year ago

blenzi commented 1 year ago

This PR adds a script and adapts the code to be able to backup db content and upload it to s3 bucket

ghost commented 1 year ago

Nice of you to open a PR :pray: When you're ready and want to get it reviewed, post a comment in this Pull Request with this message: /quack review

codecov[bot] commented 1 year ago

Codecov Report

Merging #271 (e825116) into main (c10ff1c) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #271   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           74        74           
=========================================
  Hits            74        74           
Flag Coverage Δ
client 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

blenzi commented 1 year ago

/quack review

frgfm commented 1 year ago

Great idea, we definitely need some backup! One suggestion though: to avoid mixing DB backup & images in the same bucket, it might be worth setting a simple cron job instead?

What I have in mind would be the CRON job doing in order:

What do you think?