From charlesreid1

backup

what to back up

Components to back up:

  • Lamp server
  • Gitea server
  • Wiki
  • Website

Lamp server:

  • Apache config
  • Nginx config
  • MySQL config
  • PHP config

Gitea server:

  • Repositories
  • Configuration files
  • Source code (from github/etc)

where to back up

Two sets of scripts:

  • short term backups
  • long term backups

Short term backups:

  • rotating schedule
  • circular list
  • 5 days of files
  • delete older than 5 days

Long term backups:

  • fixed schedule
  • Weekly backups on the 1st, 7th, 14th, 21st, 28th
  • Weekly backups go back 1 month
  • Monthly backups on the 1st
  • Monthly backups go back 6 months
  • Files older than 6 months are put in S3 Glacier

Maintenance script:

  • Weekly tasks:
    • create weekly backups
    • check If it is the 1st
    • if so, do monthly tasks
  • Monthly tasks:
    • remove all weekly backups except the 1st
    • move weekly backup from 1st into monthly backups
    • Move oldest monthly (6 months old) into glacier

restore

Components to restore:

  • Lamp server
  • Gitea server - building gitea from source, deploying
  • Wiki
  • Website
  • Jobs - cron jobs, backup scripts, push/pull scripts, screen processes


flags