Skip to content

Instantly share code, notes, and snippets.

@fd0
Created December 14, 2020 20:23
Show Gist options
  • Save fd0/a886978e762d38b12521ad253e165013 to your computer and use it in GitHub Desktop.
Save fd0/a886978e762d38b12521ad253e165013 to your computer and use it in GitHub Desktop.
for i in {0..40}; do
timestamp=$(date +"%Y-%m-%d 12:00:00" -d "+ ${i} days")
echo "=========================================================="
echo "run backup on ${timestamp}"
./restic backup --quiet --time "${timestamp}" main.go
./restic forget --keep-weekly 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment