samoylenkodmitry / shrtlin

shrtlin - is an all-in-one privacy-focused self-hosted open-source URL shortener for all platforms
https://shrtl.in
MIT License
7 stars 1 forks source link

Server: backup database cron task #14

Open samoylenkodmitry opened 1 month ago

samoylenkodmitry commented 1 month ago

In the deploy.sh

Updated 30/05/2024: The first iteration of this can include just saving the database zipped copy in the ~/backups/db folder. The filename can include the current timestamp. And we can do some housekeeping to leave at most 3 recent backups. Keep in mind, the database right now lives in the docker container.

The follow up of this task can include some uploading to cloud storages, that can be configured in the .env file. (this is not required)

RAD1AN1TE commented 1 month ago

Hi, I'd like to take on this task. Could you specify the frequency for backing up the database? How about daily at 2AM?

samoylenkodmitry commented 1 month ago

Hi, I'd like to take on this task. Could you specify the frequency for backing up the database? How about daily at 2AM?

Hi, @RAD1AN1TE

Sure, it sounds good. The first iteration of this can include just saving the database zipped copy in the ~/backups/db folder. The filename can include the current timestamp. And we can do some housekeeping to leave at most 3 recent backups. Keep in mind, the database right now lives in the docker container.

The follow up of this task can include some uploading to cloud storages, that can be configured in the .env file. (this is not required)