We have a very different type of requirement that,
we have follow microservices and we need to have a backup of our database to a seperate a repository.
i am using aws codecommit for both lambda code and backups.
How the Backups are creating:
have a lambda "GenerateLambda"
which is generate database backup, i need to deploy that file into seperate repo by cloning that repo programatically.
The steps which i follws:
Inside the GenerateBackup lambda, i have added code for cloning the backup (Shallow cloning) using node exec
Clone the backup repository to /tmp/backups
Now i need to create backup ( say cron job once a day)
Create a backup.JSON
and i am looking run git diff /path/to/created/backup.json /tmp/backup/backup.json
if git diff
return non empty string i need to put the newly created file/copy the newly created file to /tmp/backup
and run git add.
and git commit -m "Timestamp"
and finally push
I already implemented s3 way with ETag to remove duplicates, the reason which i use git, then i can track the revision or the changes very easily
want to know that, is there any better way which differs from the above steps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…