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.

Revisions

  1. rxbynerd created this gist May 8, 2013.
    13 changes: 13 additions & 0 deletions backup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/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/