userdir="/Users/$USER/"
echo "Start backing up..." > $userdir/Documents/forgejo_backup/log
scp ubuntu@git.marsway.red:/home/ubuntu/forgejo.zip "$userdir/Documents/forgejo_backup/$(date +%Y%m%d).zip"

echo "Deleting old backs..."
find "$userdir/Documents/forgejo_backup/" -name "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].zip" -mtime +6 -ls >> $userdir/Documents/forgejo_backup/log
find "$userdir/Documents/forgejo_backup/" -name "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].zip" -mtime +6 -delete
