Skip to content

Instantly share code, notes, and snippets.

@orlea
Created June 11, 2019 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orlea/369d43675b5d66d5951a39fe5a7b6184 to your computer and use it in GitHub Desktop.
Save orlea/369d43675b5d66d5951a39fe5a7b6184 to your computer and use it in GitHub Desktop.
transfer_nginx_log_to_gdrive_with_rclone.sh
#!/bin/sh
set -uxe
cp /var/log/nginx/access.log.1 ~/access-`date +%Y-%m-%d-%H%M`.log
rclone copy ~/access-`date +%Y-%m-%d-%H%M`.log gsuite:logs/mstdn.asterism.xyz-nginx/
rm -f ~/access-`date +%Y-%m-%d-%H%M`.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment