Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- SSHPWDFILE="/path/to/your/password/file.txt"
- BACKUPFILE="backup-file-name-"`date '+%d-%m-%Y'`".tar.gz";
- REMOTEBACKUPFOLDER="/path/to/your/backups/on/the/remote/server/";
- LOCALBACKUPFOLDER="/path/to/your/backups/locally/";
- REMOTESERVERLOGIN="user@yourserver.com";
- sshpass -f $SSHPWDFILE scp $REMOTESERVERLOGIN:$REMOTEBACKUPFOLDER$BACKUPFILE $LOCALBACKUPFOLDER.;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement