Junyoung Jung

create backup.sh

Showing 1 changed file with 15 additions and 0 deletions
#!/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
\ No newline at end of file