Skip to content

Instantly share code, notes, and snippets.

@ediskandarov
Created September 20, 2018 05:29
Show Gist options
  • Save ediskandarov/fb494224ad781ec41c913e6718281966 to your computer and use it in GitHub Desktop.
Save ediskandarov/fb494224ad781ec41c913e6718281966 to your computer and use it in GitHub Desktop.
Fetch a file from remote sever when there is no ssh or any other access
$ # compress a file and encode it in base64 format
$ gzip -k -c grafana.db | base64 - > grafana.db.gz.base64
$ # calculate md5 sum
$ md5sum grafana.db.gz.base64
$ # calculate md5 sum and compare results
$ md5sum grafana.db.gz.base64
$ # to decompress, reverse actions
$ base64 -D grafana.db.gz.base64 | gunzip > grafana.db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment