Skip to content

Instantly share code, notes, and snippets.

@tobijibu
Last active January 16, 2017 08:39
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 tobijibu/291e6e4a7e9f3cb19c67256c045967fb to your computer and use it in GitHub Desktop.
Save tobijibu/291e6e4a7e9f3cb19c67256c045967fb to your computer and use it in GitHub Desktop.
#!/bin/sh
echo 'Backup download start'
# バックアップディレクトリにあるファイルをローカルディレクトリにまとめてダウンロード
scp -i ~/.ssh/tobijibu.ppk -r tobijibu@192.168.1.105:/home/tobijibu/redmine /c/Users/tobijibu/_bkups
# バックアップ済みのファイルを別のディレクトリへ移動(削除しても良い)
ssh tobijibu@192.168.1.105 -i ~/.ssh/tobijibu.ppk "mv /home/tobijibu/redmine/* /home/tobijibu/redmine_bkups"
echo 'Backup download end'
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment