Subject | Re: [firebird-support] Backup on Linux |
---|---|
Author | Milan Babuskov |
Post date | 2005-08-11T11:30:55Z |
jobrian_t wrote:
dailiy backup into /backup direcotry you could do something like this:
crontab -e
This will open the editor with your crontab file. Now, add a line like this:
0 2 * * * gbak -bv employee.gdb /backup/emp-`date +%F`.gbk > backup.log
Save the file and new crontab will be installed.
This will backup the database each day at 2:00 am and write the log in
backup.log file. You can even have a log for each day. Be sure to use
the full paths to gbak, database, backup and log files, as cron does not
run in the same environment as you (as a user) do.
--
Milan Babuskov
http://www.flamerobin.org
> Im a bit new in Firebird specially on Linux. I read several articlesBTW, to automate it, use cron. It is quite simple. For example, for
> pertaining the use of gbak. My problem is I do not know how to
> automate it to run on a daily basis. I wish I could backup the
> database using the date as its filename, something like this
> DB = employee.gdb
> Backup = employeeAug102005.gbk
> employeeAug112005.gbk
dailiy backup into /backup direcotry you could do something like this:
crontab -e
This will open the editor with your crontab file. Now, add a line like this:
0 2 * * * gbak -bv employee.gdb /backup/emp-`date +%F`.gbk > backup.log
Save the file and new crontab will be installed.
This will backup the database each day at 2:00 am and write the log in
backup.log file. You can even have a log for each day. Be sure to use
the full paths to gbak, database, backup and log files, as cron does not
run in the same environment as you (as a user) do.
--
Milan Babuskov
http://www.flamerobin.org