Skip to content

Backup procedures, triggers and views from a Firebird database.

Notifications You must be signed in to change notification settings

mdamaceno/fb_source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FB Source

It makes a backup of procedures, triggers and views from a Firebird database. It is made to run on a server, preferably with cron.

Getting Started

FB Source uses Ruby, so you need to have it installed on your machine. I recommend installing Ruby via RVM or rbenv.

Clone the repository:

$ git clone https://github.com/mdamaceno/fb_source.git && cd fb_source

Create a file called .env with the following structure:

DATABASE_HOST=localhost
DATABASE_PORT=3050
DATABASE_NAME=/path-to-database/DATABASE.GDB
DATABASE_USERNAME=username
DATABASE_PASSWORD=password

OUTPUT_PATH=./output-path

Change the values as needed.

Usage

Go to FB Source's root folder and run the command:

$ ruby run.rb

This command generates the files with SQL script in the procedures, triggers and views folders located in output directory.

Optionally, you can change the output directory passing parameters to the command:

-o, --output PATH  # custom output path

Docker

You can use FbSource with Docker if you want. Just use the following command:

$ docker run --rm --net host \
  -e DATABASE_HOST=localhost \
  -e DATABASE_PORT=3050 \
  -e DATABASE_NAME=/path-to-database/DATABASE.GDB \
  -e DATABASE_USERNAME=username \
  -e DATABASE_PASSWORD=password \
  -v $PWD/backup_fb:/output \
  maadamaceno/fb_source

# OR

$ docker run --rm --net host \
  --env-file $PWD/env \ # path to an env file
  -v $PWD/backup_fb:/output \
  maadamaceno/fb_source

Change $PWD/backup_fb to the path where you want to store the backup.

Contributing

All the contributions are welcome. Submit your pull request!

License

This project is licensed under the MIT License.

About

Backup procedures, triggers and views from a Firebird database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages