My answer is not about backup, but about restore, but still maybe helpful for somebody.
If you have Windows, have remote network location and want to restore backup from remote .fbk file to remote location via your local machine, you can use this method:
- On your local Windows machine (on which you have DBMS installed) execute:
mklink /D C:\LinkName \\NetworkLocation\LocationName
e.g. mklink /D C:\my_share \\10.11.11.123\Some_share
Thus on your local "C:\"
drive will be created a symlink my_share
pointed at network location.
- On your local Windows machine execute
gbak
command like this:
"C:\Program Files\...\gbak.exe" -c -v -n "\\10.11.11.123\Some_share\...\someBackup.fbk" "C:\my_share\...\someRestore.fdb" -user sysdba -password masterkey
FYI: In my examples address 10.11.11.123
is IP of your network location.
How to connect to remote FDB
In firebird.conf
set RemoteFileOpenAbility
to 1. This parameter will allow your DBMS connect to DB located in remote folder. Also check that Redirection
parameter is set to 0 or is commented with #.
Download PSTools from https://learn.microsoft.com/en-us/sysinternals/downloads/psexec, unpack it.
From PSTools
folder via CMD (started as admin) execute psexec -i -s cmd.exe
, accept agreement.
In popped-up CMD's window execute whoami
to check that you are now identified as nt authority\system
.
In that window execute such command:
net use z: \\123.111.111.111\my_share /persistent:yes
, where z
is a network drive letter, you want to assign, and 123.111.111.111\my_share
is an address of your network share.
If you will get System error 58
, try to execute command with specifying user/password in quotes like:
net use z: \\123.111.111.111\my_share /persistent:yes /user:"your username" "your password"
If in the future you will need to disconnect that network drive, perform step 3, then execute net use z: /delete
.
- Now you can launch your client (ibexpert, dbeaver, etc.) and connect to remote FDB file:
- Server name:
localhost
- FDB file path:
Z:/path_to_FDB/some_db.FDB