Skip to content

Instantly share code, notes, and snippets.

View my-yangj's full-sized avatar

theta.yang my-yangj

  • shanghai
View GitHub Profile
@my-yangj
my-yangj / backup_gitea.sh
Created March 8, 2021 05:03 — forked from sinbad/backup_gitea.sh
My Gitea Backup & Restore Scripts
#!/bin/bash
# `gitea dump` doesn't currently back up LFS data as well, only git repos
# It primarily backs up the SQL DB, and also the config / logs
# We'll backup like this:
# * "gitea dump" to backup the DB and config etc
# * tar / bzip all the repos since they will be skipped
# * Not rotated because git data is immutable (normally) so has all data
# * rsync LFS data directly from /volume/docker/gitea/git/lfs
# * No need for rotation since all files are immutable