104 - backup google drive#467
Open
JosueModesto wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
Cria o novo serviço
database-backuppara fazer backup automático do PostgreSQL e enviar os arquivos para o Google Drive, seguindo o mesmo padrão de container standalone usado nodatabase-sync.O que foi feito
script/database-backup/postgresql-client-18rclonecrongzipbackup.shpara:pg_dump -Fp.sql.gzentrypoint.shpara:rclonedocker-compose.ymlpara teste local.env.examplecom as variáveis necessáriascaptain-definition.jsonpara deploy no CapRoverREADME.mdcom instruções de uso, restore e validaçãoPolítica de retenção
Após cada upload, o serviço mantém:
Isso evita crescimento infinito da pasta e mantém histórico útil para restore.
Formato do backup
Os arquivos seguem o padrão:
{DATABASE_NAME}_{unix_timestamp}.sql.gzExemplo:
herbario_prod_1748469600.sql.gzValidações realizadas
host.docker.internalObservações
host.docker.internalImpacto
Esse PR adiciona uma solução automatizada, isolada e reproduzível para backup do banco de dados, com armazenamento externo no Google Drive e política de retenção para evitar acúmulo desnecessário de arquivos.