I am trying to build an automated background backup program to backup my entire website and its heavy photo folders, using Amazon's cloud storage service, S3.
I am using S3Sync from S3Tools and have successfully tested a dummy backup using only the command line window. When I save the working command line to a batch file (.BAT) and have a Windows schedule call it, it does not work.
I can only think this has something to do with the local paths set in the command line. If I go on to my server and open the command prompt from my 'Start' button, the command prompt has a default of:
c:\Documents and Settings\administrators>_
If I go on to my server and go to c:\windows\system32 directory and open cmd.exe, the default is:
c:\windows\system32>_
Which makes me think this is the problem, I think I'm getting something like this when it's run:
c:\windows\system32c:\home\p\h\photos\private\s3sync\s3sync.exe
What is the sensible way to get around this? Can I change the default directory on the command prompt processor, when it's first loaded? Or is there a way of changing my batch command code to use the local paths correctly? Maybe this isn't the problem at all and it's something else?
Any help greatly appreciated.
My command line code:
c:\home\p\h\photos\private\s3sync\S3Sync.exe -AWSAccessKeyId xxx -AWSSecretAccessKey xxx -SyncDirection upload -LocalFolderPath "C:\home\p\h\photos\www\assets_web2" -BucketName op-photos-web -RequestEndpoint s3-eu-west-1.amazonaws.com