Firebird remote backup

拟墨画扇 提交于 2019-12-13 15:52:51

问题


I want to backup a firebird database. I am using gbak.exe utility. It works fine.

But, when i want to do a backup from a remote computer, the backup file is stored on the serveur file system. Is there a way to force gbak utility to download backup file ?

Thanks


回答1:


Backup is stored on the Firebird Server

gbak -b -service remote_fb_ip:service_mgr absolute_path_to_db_file absolute_path_to_backupfile -user SYSDBA -pass masterkey

Backup is stored on the local machine

gbak -b  remote_fb_ip:absolute_path_to_db_file path_to_local_file -user SYSDBA -pass masterkey

see: remote server local backup and gbak documentation




回答2:


It is always a problem to grab a remote database onto a different remote computer. For this purposes, our institute uses Handy Backup (for Firebird-based apps, too), but if you are preferring GBAK, these are some more ways to do it.

A simplest method is to call directly to a remote database from a local machine using GBAK (I see it was already described before me). Another method is an installation of GBAK to a remote machine using administrative instruments for Windows networks. This method can be tricky, as in mixed-architecture networks (with domain and non-domain sections) some obstacles are always existed.

Therefore, the simplest method is writing a backup script (batch) file calling GBAK and then copying the resulted Firebird file to some different network destination, using a command-line network file manager or FTP manager like FileZilla. It require some (minimal) skill and research, but can work for many times after a successful testing.

Best regards!




回答3:


If you have gbak locally, you can back up over a network. Simply specify the host name before the database.

For example:

gbak -B 192.168.0.10:mydatabase mylocalfile.fbk -user SYSDBA -password masterkey



回答4:


I believe you should be able to do this if you use the service manager for the backup, and specify stdout as the backup file. In that case the file should be streamed to the gbak client and you can write it to disk with a redirect.

gbak -backup -service hostname:service_mgr employee stdout > backupfile.fbk

However I am not 100% sure if this actually works, as the gbak documentation doesn't mention this. I will check this and amend my answer later this week.




回答5:


Try this command:

"C:\Program Files (x86)\Firebird\Firebird_2_5\bin\gbak" -v -t -user SYSDBA -password "masterkey" 192.168.201.10:/database/MyDatabase.fdb E:\Backup\BackupDatabase.fbk

Of course you need to update your paths accordingly :)



来源:https://stackoverflow.com/questions/26715775/firebird-remote-backup

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!