Skip to content

Instantly share code, notes, and snippets.

@rxbynerd
Created May 8, 2013 22:58
Show Gist options
  • Save rxbynerd/5544323 to your computer and use it in GitHub Desktop.
Save rxbynerd/5544323 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
cd /home/luke/supersonic
NOW=`ruby -e"puts Time.now.to_i"`
/usr/bin/tmux send-keys -t supersonic:1 "save-all" C-m
/usr/bin/tmux send-keys -t supersonic:1 "save-off" C-m
cp -R /home/luke/supersonic/supersonic /home/luke/supersonic/supersonic_backup
/usr/bin/tmux send-keys -t supersonic:1 "save-on" C-m
tar cvzf backup_$NOW.tar.gz supersonic_backup/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment