backup.sh 185 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/bin/bash NAME=$(date +%m%d%H%M) HOST='User remote server ip' USER='User id' FILE=$NAME'.tar' tar -cvzf $NAME.tar * sftp $USER@$HOST << END_SCRIPT put $FILE quit END_SCRIPT exit 0