The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,842 other followers

Firebird gbak backing up a remote database that has spaces in the path and is on a remote Windows machine

Posted by jpluimers on 2016/09/13

I will likely need a batch file like this again:

setlocal
set gbakExe=C:\Program Files (x86)\Firebird\Firebird_2_5\bin\gbak.exe
set dbPart=MyDatabase
set dbSource=192.168.199.24:C:\Path with spaces\%dbPart%.fdb
set dbUser=sysdba
set dbPassword=masterkey
"%gbakExe%" -verify -transportable -user %dbUser% -password %dbPassword% "%dbSource%" %dbPart%.fbk
endlocal

You need the quotes around %gbakExe% and %dbSource% to ensure spaces in paths are preserved.

–jeroen

Sources:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: