·조회수 227

Scheduling with Github Actions

One of the biggest concerns I had when starting the DLog blog service was database backup. If you are using a cloud service like MongoDB Atlas, automatic backups are provided, but since I was operating MongoDB in an on-premise environment, I had to build a backup system myself.

At first, I simply set up a regular mongodump execution using the cron command in Ubuntu. However, at some point, this scheduling stopped working, and without realizing it, I experienced a precarious situation where some data was lost while proceeding with DB migration.

After that, I realized the need for a "backup system that never turns off." After much consideration, I decided to use GitHub Actions' schedule feature. This method has the following advantages:

  • It is not affected even if the server shuts down or restarts
  • GitHub Actions itself runs reliably
  • Since the backup logs are left on GitHub, it is possible to quickly identify the cause in case of problems

Now, I have set it up to create an archive file backed up by mongodump at a specific time every day and upload it to AWS S3.

The once anxious backup has now become a reliable automated system.

김지식
김지식
웹, 앱 개발자입니다.

댓글

댓글을 불러오는 중...

© 2025 Dlog. All rights reserved.

사업자등록번호: 407-07-93655 | 통신판매업번호: 2025-성남중원-0262 | 상호: 댄버 | 이메일: dan@danver.io | 대표 : 김지식 | 소재지 : 경기도 성남시 중원구 산성대로552번길 15 123동 1306호 | 대표전화 : 0507-1351-6824