3

Tip #576   bzip2 ssh copy and machine power off

nice ssh username@remoteservername "tar cjf - -C /from/basedir/ dirtocopy" | tar xjvf - -C /to/dir/ ; sleep 120 ; shutdown -P now


Copy the remote directory dirtocopy from the remote server to dir of local machine. Transfer the contents using bzip2 compression. When it's done (even if it fails) wait 120 seconds and power off the machine.