Jump to content
Server Maintenance This Week. ×

This topic is 5044 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi

Is it possible to backup a FM database running on a Windows Server 2003 to a networked XServe.

Every time I try this I get " Not a valid path ".

Should I be mapping the volume?

As a example how should it look: filemac:/192.168.0.168/Public/Backup/

Link to comment
Share on other sites

It is indeed not a valid path.

filemac:/192.168.0.168/Public/Backup/

means "look for a volume on the local mac filing system named 192.168.0.168".

This will fail because (a) there is no volume called "192.168.0.168" and (: it is not running on a mac.

I'd suggest you do the FMS backup to a local folder on the 2003 server, then make a batch file / scheduled task to take a copy of the backup folder to the XServe.

You could schedule one of the following:

1) mount the XServe volume on the 2003 box, and xcopy to it

2) ftp / sftp the backup folder from the 2003 box to the XServe

3) get the XServe to mount the 2003 volume and copy from it

Hope that helps

James

Link to comment
Share on other sites

Hi,

I'm actually testing a backup job that compress the files to a remote folder.

I'm using 7-zip to compress the files.

It's not fully tested and still debugging it. But it's working for me when launching it manually. Haven't tried yet automatically.

Here's the code :


`'Author : Nicolas Bourré

'Date : 20100715

'Version : 0.1

'Description : Finds the latest directory and compress it to a different place.



Option Explicit



dim q



q = Chr(34) ' Double quotes



dim objFSO, objFldr, objSFldr

dim srcPath, dstPath

dim logFile





'Create FileSystemObject

Set objFSO = CreateObject ("Scripting.FileSystemObject")



srcPath = "g:databackupquotidien" 'Source folder path



Set objFldr = objFSO.GetFolder(srcPath)



dim maxVal 'Keep the latest date



maxVal = #2010-01-01#

dim newestPath 'The path



for each objSFldr in objFldr.SubFolders

	if (objSFldr.DateCreated > maxVal) then

		maxVal = objSFldr.DateCreated

		newestPath = objSFldr.Path ' We have the newestPath path

	end if	

next



dstPath = "m:fm" ' Destination path



logFile = dstPath & "fm_bu_log.txt" 'Logfile path



dim dstName

dstName = dstPath & WeekDayName (WeekDay (Date)) & ".7z" 'Destination file name



newestPath = newestPath & ""



dim msg



if objFSO.folderExists (dstPath) and objFSO.FolderExists(newestPath) then

	

	dim res

	res = compress (newestPath, dstName)

	if not res then

		msg = CStr (Now) & ";Erreur compression;La compression n'a pu etre completee;Resultat : " & res

	else

		msg = CStr (Now) & ";Compression;La compression a ete completee;Resultat : " & res

	end if

	

	backupLog logFile, msg

else

	

	

	if not objFSO.folderExists (dstPath) then

		msg = CStr(Now) & ";Erreur;" & dstPath & " est inexistant;"

	else

		msg = CStr(Now) & ";Erreur;" & newestPath & " est inexistant;"

	end if

	

	backupLog logFile, msg

end if





set objSFldr = nothing

set objFldr = nothing

Set objFSO = nothing



function compress (src, dst)

	dim sevenZip

	dim cmd

	dim retValue

	

	

	sevenZip = "C:Program Files7-Zip7z.exe"

	cmd = "cmd /c " & q & sevenZip  & q  &  " " ' watch the trailing space

	cmd = cmd & " a -t7z " & dst & " " & src

	if not objFSO.FileExists (sevenZip) then

		retValue = false

	else

		dim msg

		

		msg = CStr (Now) & ";Compression;Debut;"

		backupLog logFile, msg

		'MsgBox ("Start!")

		dim sh		

		'MsgBox (cmd)

		set sh = WScript.CreateObject ("wscript.shell")

		sh.Run cmd, , true

		set sh = nothing

		

		msg = CStr (Now) & ";Compression;Fin;"

		backupLog logFile, msg

		'MsgBox ("Fin!")

		

		retValue = true

	end if

	

	compress = retValue

end function



'Writes text in a log file

'Respect format : date-heure;Action;Message;Autre

function backupLog (fn, line)

	dim fs

	dim f

	set fs = CreateObject ("Scripting.FileSystemObject")

	

	const ForAppending = 8

	

	set f = fs.OpenTextFile (fn, ForAppending, True) 

	

	f.WriteLine (line)

	f.Close

	

	set f = nothing

	

	set fs = nothing

	

end function

Link to comment
Share on other sites

This topic is 5044 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.