Differences
This shows you the differences between the selected revisions of the page.
| 2016-02-03 | 2016-02-03 | ||
| redundant type specification (martin) | no my prefix (martin) | ||
| Line 98: | Line 98: | ||
| Try | Try | ||
| ' Setup session options | ' Setup session options | ||
| - | Dim mySessionOptions As New SessionOptions | + | Dim sessionOptions As New SessionOptions |
| - | With mySessionOptions | + | With sessionOptions |
| .Protocol = Protocol.Sftp | .Protocol = Protocol.Sftp | ||
| .HostName = "example.com" | .HostName = "example.com" | ||
| Line 107: | Line 107: | ||
| End With | End With | ||
| - | Using mySession As New Session | + | Using session As New Session |
| ' Connect | ' Connect | ||
| - | mySession.Open(mySessionOptions) | + | session.Open(sessionOptions) |
| ' Execute mysqldump on the server to dump all MySQL databases and compress the results | ' Execute mysqldump on the server to dump all MySQL databases and compress the results | ||
| Line 119: | Line 119: | ||
| String.Format("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}", _ | String.Format("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}", _ | ||
| dbUsername, dbPassword, tempFilePath) | dbUsername, dbPassword, tempFilePath) | ||
| - | mySession.ExecuteCommand(dumpCommand).Check() | + | session.ExecuteCommand(dumpCommand).Check() |
| ' Download the database dump | ' Download the database dump | ||
| - | mySession.GetFiles(tempFilePath, "D:\dbbackup\").Check() | + | session.GetFiles(tempFilePath, "D:\dbbackup\").Check() |
| End Using | End Using | ||