Page 1 of 1

Backup over VPN

Posted: Sat Apr 22, 2006 11:10 pm
by Jeremy
Hi. I've been experimenting with AISBackup and am really liking it so far. It is working very nicely for my local backups.

I would like to use the FTP backup feature to accomplish an off-site backup of my most critical files. The only problem I have is that the FTP server is behind a firewall, and I have to start a VPN connection manually to get access to it. I would like to configure AISBackup to run this FTP job automatically every night, so does anyone know a way to programatically start/stop a Windows XP VPN (PPTP) connection, ideally from within AISBackup?

I've been playing with the Task Manager inside the program, having it invoke a desktop shortcut I use to start the VPN connection, but that does not work. Any suggestions?

Thanks!

Jeremy

VPN

Posted: Tue Apr 25, 2006 12:44 pm
by Barry
By task manager do you mean the AISBackup pre and post backup job?

Please post an example of the shortcut and script / batch job called to start VPN.

Barry

Posted: Tue Apr 25, 2006 2:41 pm
by Jeremy
Thank you for replying.

Sorry if I was not clear. Yes, I did mean the pre- and post- backup jobs. Not that I have to use that method exclusively. My goal is to simply automate the process of starting the VPN connection, doing the backup, then disconnecting the VPN. Perhaps I could do it with three separate Scheduled Tasks in the Window control panel?

I also don't have any script I can post really. What I meant was that I created a shortcut to the VPN connection in Windows XP's Control Panel -> Network Connections window. The icon for that connection is setup to automatically connect and log me in to the remote network. In any case, I cannot simply have AISBackup invoke that shortcut (nothing happens) and it would still leave the problem of disconnecting.

I am hoping to find some sort of RAS command line I could put into a script (or two scripts, one to connect, one to disconnect). This is not a problem with AISBackup, I am just unsure how to make Windows do what I want. I haven't hit on the Google query yet that shows me how to do it either. : )

Jeremy

Got it!

Posted: Tue Apr 25, 2006 2:45 pm
by Jeremy
Oh my... wouldn't you know that it would happen.

Right after posting I tried one last google search and found the "rasdial" command which appears to do what I want!

Rasdial VPN username password (connects)

rasdial VPN /disconnect (disconnects)

All completely scriptable.

Thanks again,

Jeremy

VPN

Posted: Tue Apr 25, 2006 3:13 pm
by Barry
You should be able to put rasdial in pre and post jobs (surrounding the backup), see Manage Backup / Change Backup Job Settings / Pre and Post Jobs

Please let us know if this works okay.

Thanks

Barry

RASDIAL

Posted: Tue Apr 25, 2006 5:57 pm
by Barry
There is a problem with the current version of AISBackup in that the full path of commands must be specified even if they are on the current path, so rasdial must be specified as:

C:\windows\system32\rasdial.exe

(if running from te C: drive)

This will be corrected in the next release.

If the VPN name has spaces in it the parameters must be enclosed in quotes, e.g. AISCL VPN must be specified as "AISCL VPN".

Barry

Posted: Wed Apr 26, 2006 2:13 am
by Jeremy
Thanks for the information.

Well, I am slightly successful. I've got the auto connect/disconnect working, but the connect seems to happen too late in the process. For example, I click on Run Backup and get a dialog stating:

Failed to attach to FTP Server: xxx Re-try?

If I say no, it will then start the VPN, perform the backup, then disconnect as I want.

I guess AISBackup is trying to access a catalog file on the FTP server before starting the backup, and thus causing my problem since the pre-job command has not run yet?

Also I noticed if I cancel an FTP job while the upload is happening, and later run the backup again, it doesn't seem to upload the files that didn't get transferred (I got a nothing to backup dialog)? In my case, the files that were being backed up had not changed, so there was no change to the local AIS-created zip files on my hard drive. I am guessing since the staged zip files were not changed, the software did not proceed to the upload portion of the backup?

Getting closer! :) Thanks for your help.

Jeremy

VPN

Posted: Wed Apr 26, 2006 1:14 pm
by Barry
I noticed the same as you about the order of things so I moved the pre-job to before the backup calculates the backup. Actually this makes more sense as the backup may depend on files created by the pre job.

However, this does not solve the 'connect to' VPN problem as there are other functions within AISBackup which would need VPN been established before hand.

I am looking into making this option available in AISBackup, meanwhile it is probably better to establish VPN prior to calling AISBackup.

As far as the cancel during upload is concerned: Change the FTP parameters to upload on-the-fly, this way each file is uploaded as it is created, therefore if the job is cancelled it will pick up the files which have not been backed up next time. For your existing job you will have to create or change a file in the backup source to get it moving again, or basically 'touch' a file so the date/time changes.

The next version of AISBackup has an optional FTP throttle so as not to 'hog' your broadband connection during an FTP upload.

Barry

Posted: Wed Apr 26, 2006 11:50 pm
by Jeremy
Barry,

Thanks for your help. Since my goal was to automate this backup, I created a separate Windows scheduled task to establish the VPN that goes off a couple minutes for the AISBackup task. The post backup command then disconnects the VPN after the FTP session is done. This seems to work fine for me.

I also changed the FTP to on the fly as you suggested.

Jeremy