Skip to content

Instantly share code, notes, and snippets.

@vshmoylov
Created August 4, 2023 15:50
Show Gist options
  • Save vshmoylov/fc68878a48e1162eaa6498e14b3326d9 to your computer and use it in GitHub Desktop.
Save vshmoylov/fc68878a48e1162eaa6498e14b3326d9 to your computer and use it in GitHub Desktop.
VOLUME=vol_name_here; ssh your.server "cd `docker volume inspect --format "{{ .Mountpoint }}" $VOLUME`; tar -czf - ." > ${VOLUME}-backup-`date +"%Y-%m-%d_%H.%M.%S"`.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment