You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
332 B

#!/bin/bash
# Run as root
set -x
GITEAUSER=gitea
BACKUPDIR=/srv/BACKUPS
NOW=$( date +%Y%m%d%H%M )
mkdir -p $BACKUPDIR/$NOW
chmod og-rwx $BACKUPDIR/$NOW
chown $GITEAUSER:$GITEAUSER $BACKUPDIR/$NOW
cd $BACKUPDIR/$NOW
sudo -u gitea \
nice gitea dump \
--config /etc/gitea/gitea.ini \
--tempdir $BACKUPDIR/$NOW