How to select a destination folder on another machine

How to select a destination folder on another machine

by Scott Bartley -
Number of replies: 1

I would like my backups to be saved on a different machine than the one that is running Moodle. \\server1\Common\Systems\Backup is the folder address that I type in to Windows Explorer to get to the folder I want to use for the backups. When I put this address into Moodle, it says, "Some settings were not changed due to an error: Path doesn't exist in your server!"

I added "Everyone" to the permissions to make sure it wasn't a permissions error. What am I missing? Both machines are on the same network and both are running Windows 2000.

Thanks,

Average of ratings: -
In reply to Scott Bartley

Re: How to select a destination folder on another machine

by Scott Bartley -

If anyone wants this info, I figured this out with help from my IT guy.

The folder saved in Moodle has to be on a drive local to that machine. We made a .bat file that copies the local folder onto another machine. Finally we made a Windows Scheduled Task that runs the .bat file a few minutes after the scheduled time that Moodle creates the backup.

The syntax of the file had to be tweaked a few times to get it to work. I'm not an expert on scripts, so there may be a more efficient example, but this one works. Replace "server1" and "anothermachine" with the name of your moodle server and the second machine to which you wish to copy the backup files. The path saved in Moodle in Administration->Courses->Backups is D:\Support\backup\moodle which corresponds to "\\server1\d$\Support\backup\moodle\" in the script in my example, and "\\anothermachine\common\Systems\Backup" is the folder location on the other machine. Everything from the "xcopy" to the "/y" is on one line in case the forum creates an artificial line break. Add the word "pause" before the exit line if you need to see it in action for testing/troubleshooting purposes. Copy and paste this text below into Notepad and then change the file extension from .txt to .bat. After you've gotten it to work, use the task scheduler to fire it 10 minutes or so after your scheduled time in Moodle.

xcopy "\\server1\d$\Support\backup\moodle\*.*" "\\anothermachine\common\Systems\Backup" /y

exit