Subject | Re: nbackup+php = around-clock+around-global |
---|---|
Author | lee_domain |
Post date | 2007-10-11T01:10:15Z |
--- In firebird-php@yahoogroups.com, "lee_domain" <lee_domain@...> wrote:
2007-10-11-08-19-49.
Resource id #2
SELECT RDB$BACKUP_LEVEL FROM RDB$BACKUP_HISTORY
level_0 primary nbackup found
level_1 nbackup file found
level_2 nbackup file found
level_3 nbackup file found
now begin to do the nbackups
the current directory:/usr/local/apache2/htdocs
change directory to /opt/firebird/bin
the current directory:/opt/firebird/bin
./nbackup -U sysdba -P masterkey -B 3 /home/litaoman/employee.fdb
/tmp/bak/employee_3-2007-10-11-08-19-49.nbk
nbackup result:
now change back to starting directory
the current directory:/usr/local/apache2/htdocs
system re-check if all nbackup files in position
file name: .
file name: employee_0-2007-10-01-10-33-46.nbk
.............................................
.............................................
file name: employee_3-2007-10-11-08-13-07.nbk
file name: employee_3-2007-10-11-08-19-49.nbk
file name: ..
nbackup file successful: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk
confirm if nbackup is successful by re-connect the database
SELECT RDB$FILE_NAME FROM RDB$BACKUP_HISTORY
Resource id #2
/tmp/bak/employee_0-2007-10-01-10-33-46.nbk
..........................................
..........................................
/tmp/bak/employee_3-2007-10-11-08-13-07.nbk
/tmp/bak/employee_3-2007-10-11-08-19-49.nbk
nbackup file confirmed: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk
get all information from RDB$BACKUP_HISTORY for this nbackup file
SELECT * FROM RDB$BACKUP_HISTORY WHERE RDB$FILE_NAME =
'/tmp/bak/employee_3-2007-10-11-08-19-49.nbk'
;;90;;2007-10-11
08:19:49;;3;;{5AB5408B-DEA9-AC7F-B914-708E7424FF5A};;267;;/tmp/bak/employee_3-2007-10-11-08-19-49.nbk;;
disconnect from database OK !
bzip2 result:
compress file successful: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk.bz2
begin to send nbackup file as e-mail-attachment
employee._3-.2007-10-11-08-19-49.nbkbz2
Message has been sent.
unbzip2 result:
de-compress file successful: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk
==========================================================================
>Following is the Console display after running the above script:
> Following is the updated PHP script to run nbackup on FB2.1
> Put this script in a place where your system can call it
> automatically/regularly in back-ground
> ..........................
2007-10-11-08-19-49.
Resource id #2
SELECT RDB$BACKUP_LEVEL FROM RDB$BACKUP_HISTORY
level_0 primary nbackup found
level_1 nbackup file found
level_2 nbackup file found
level_3 nbackup file found
now begin to do the nbackups
the current directory:/usr/local/apache2/htdocs
change directory to /opt/firebird/bin
the current directory:/opt/firebird/bin
./nbackup -U sysdba -P masterkey -B 3 /home/litaoman/employee.fdb
/tmp/bak/employee_3-2007-10-11-08-19-49.nbk
nbackup result:
now change back to starting directory
the current directory:/usr/local/apache2/htdocs
system re-check if all nbackup files in position
file name: .
file name: employee_0-2007-10-01-10-33-46.nbk
.............................................
.............................................
file name: employee_3-2007-10-11-08-13-07.nbk
file name: employee_3-2007-10-11-08-19-49.nbk
file name: ..
nbackup file successful: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk
confirm if nbackup is successful by re-connect the database
SELECT RDB$FILE_NAME FROM RDB$BACKUP_HISTORY
Resource id #2
/tmp/bak/employee_0-2007-10-01-10-33-46.nbk
..........................................
..........................................
/tmp/bak/employee_3-2007-10-11-08-13-07.nbk
/tmp/bak/employee_3-2007-10-11-08-19-49.nbk
nbackup file confirmed: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk
get all information from RDB$BACKUP_HISTORY for this nbackup file
SELECT * FROM RDB$BACKUP_HISTORY WHERE RDB$FILE_NAME =
'/tmp/bak/employee_3-2007-10-11-08-19-49.nbk'
;;90;;2007-10-11
08:19:49;;3;;{5AB5408B-DEA9-AC7F-B914-708E7424FF5A};;267;;/tmp/bak/employee_3-2007-10-11-08-19-49.nbk;;
disconnect from database OK !
bzip2 result:
compress file successful: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk.bz2
begin to send nbackup file as e-mail-attachment
employee._3-.2007-10-11-08-19-49.nbkbz2
Message has been sent.
unbzip2 result:
de-compress file successful: /tmp/bak/employee_3-2007-10-11-08-19-49.nbk
==========================================================================