Class: FireRuby::Restore
- Inherits:
-
Object
- Object
- FireRuby::Restore
- Defined in:
- lib/src.rb
Overview
This class represents a service manager task to restore a previously created database backup on the Firebird server. NOTE: This class does not currently work on the Mac OS X platform.
Constant Summary collapse
- ACCESS_READ_ONLY =
Access mode constant definition.
39- ACCESS_READ_WRITE =
Access mode constant definition.
40- MODE_CREATE =
Restore mode constant definition.
0x1000- MODE_REPLACE =
Restore mode constant definition.
0x2000
Instance Attribute Summary collapse
-
#backup_file ⇒ Object
Attribute accessor.
-
#database ⇒ Object
Attribute accessor.
Instance Method Summary collapse
-
#access_mode ⇒ Object
This method retrieves the access mode setting for a Restore object.
-
#access_mode=(setting) ⇒ Object
This method updates the access mode setting for a Restore object.
-
#build_indices ⇒ Object
This method retrieves the build indices setting for a Restore object.
-
#build_indices=(setting) ⇒ Object
This method updates the build indices setting for a Restore object.
-
#cache_buffers ⇒ Object
This method retrieves the cache buffers setting for a Restore object.
-
#cache_buffers=(setting) ⇒ Object
This method updates the cache buffers setting for a Restore object.
-
#check_validity ⇒ Object
This method retrieves the validity checks setting for a Restore object.
-
#check_validity=(setting) ⇒ Object
This method updates the validity checks setting for a Restore object.
-
#commit_tables ⇒ Object
This method retrieves the commit tables setting for a Restore object.
-
#commit_tables=(setting) ⇒ Object
This method updates the commit tables setting for a Restore object.
-
#execute(manager) ⇒ Object
This method is used to execute a restore task against a service manager.
-
#initialize(file, database) ⇒ Restore
constructor
This is the constructor for the Restore class.
-
#log ⇒ Object
This method fetches the log value for a Restore task.
-
#no_shadows ⇒ Object
This method retrieves the no shadows setting for a Restore object.
-
#no_shadows=(setting) ⇒ Object
This method updates the no shadows setting for a Restore object.
-
#page_size ⇒ Object
This method retrieves the page size setting for a Restore object.
-
#page_size=(setting) ⇒ Object
This method updates the page size setting for a Restore object.
-
#restore_mode ⇒ Object
This method retrieves the restore mode setting for a Restore object.
-
#restore_mode=(setting) ⇒ Object
This method updates the restore mode setting for a Restore object.
-
#use_all_space ⇒ Object
This method retrieves the use all space setting for a Restore object.
-
#use_all_space=(setting) ⇒ Object
This method updates the use all space setting for a Restore object.
Constructor Details
#initialize(file, database) ⇒ Restore
This is the constructor for the Restore class.
Parameters
- file
-
A String or File containing the path and name (relative to the server) of the backup file to be used in the restore.
- database
-
A String or File containing the path and name (relative to the server) of the database file to be restored.
1595 1596 |
# File 'lib/src.rb', line 1595 def initialize(file, database) end |
Instance Attribute Details
#backup_file ⇒ Object
Attribute accessor.
1569 1570 1571 |
# File 'lib/src.rb', line 1569 def backup_file @backup_file end |
#database ⇒ Object
Attribute accessor.
1569 1570 1571 |
# File 'lib/src.rb', line 1569 def database @database end |
Instance Method Details
#access_mode ⇒ Object
This method retrieves the access mode setting for a Restore object. This will be nil until a value is actual set.
1639 1640 |
# File 'lib/src.rb', line 1639 def access_mode end |
#access_mode=(setting) ⇒ Object
This method updates the access mode setting for a Restore object.
Parameters
- setting
-
The new value for the object setting. This should be one of Restore::ACCESS_READ_ONLY or Restore::ACCESS_READ_WRITE.
1650 1651 |
# File 'lib/src.rb', line 1650 def access_mode=(setting) end |
#build_indices ⇒ Object
This method retrieves the build indices setting for a Restore object.
1657 1658 |
# File 'lib/src.rb', line 1657 def build_indices end |
#build_indices=(setting) ⇒ Object
This method updates the build indices setting for a Restore object. This value affects whether the various indexes for a database are restored with the restore task.
Parameters
- setting
-
True to rebuild the database indices, false otherwise.
1669 1670 |
# File 'lib/src.rb', line 1669 def build_indices=(setting) end |
#cache_buffers ⇒ Object
This method retrieves the cache buffers setting for a Restore object. This will be nil until a value is actual set.
1603 1604 |
# File 'lib/src.rb', line 1603 def cache_buffers end |
#cache_buffers=(setting) ⇒ Object
This method updates the cache buffers setting for a Restore object.
Parameters
- setting
-
The new value for the object setting. Should be an integer.
1613 1614 |
# File 'lib/src.rb', line 1613 def cache_buffers=(setting) end |
#check_validity ⇒ Object
This method retrieves the validity checks setting for a Restore object.
1695 1696 |
# File 'lib/src.rb', line 1695 def check_validity end |
#check_validity=(setting) ⇒ Object
This method updates the validity checks setting for a Restore object. This value affects whether the restore performs validity checks on the database as it is restored.
Parameters
- setting
-
True to perform validity checks, false otherwise.
1707 1708 |
# File 'lib/src.rb', line 1707 def check_validity=(setting) end |
#commit_tables ⇒ Object
This method retrieves the commit tables setting for a Restore object.
1714 1715 |
# File 'lib/src.rb', line 1714 def commit_tables end |
#commit_tables=(setting) ⇒ Object
This method updates the commit tables setting for a Restore object. This value affects whether the restore commits tables as they are restored.
Parameters
- setting
-
True to commit tables as they are restored, false otherwise.
1726 1727 |
# File 'lib/src.rb', line 1726 def commit_tables=(setting) end |
#execute(manager) ⇒ Object
This method is used to execute a restore task against a service manager.
Parameters
- manager
-
A reference to the service manager to execute the restore task against.
Exceptions
- FireRubyException
-
Generated whenever a disconnected service manager is specified or a problem occurs executing the task.
1782 1783 |
# File 'lib/src.rb', line 1782 def execute(manager) end |
#log ⇒ Object
This method fetches the log value for a Restore task. This value will always be nil until the task has been executed. After a successful execution the log value should contain output from the restore task generated on the server.
1792 1793 |
# File 'lib/src.rb', line 1792 def log end |
#no_shadows ⇒ Object
This method retrieves the no shadows setting for a Restore object.
1676 1677 |
# File 'lib/src.rb', line 1676 def no_shadows end |
#no_shadows=(setting) ⇒ Object
This method updates the no shadows setting for a Restore object. This value affects whether shadow databases are recreated as part of a restore.
Parameters
- setting
-
True to recreate shadow files, false otherwise.
1688 1689 |
# File 'lib/src.rb', line 1688 def no_shadows=(setting) end |
#page_size ⇒ Object
This method retrieves the page size setting for a Restore object. This will be nil until a value is actual set.
1621 1622 |
# File 'lib/src.rb', line 1621 def page_size end |
#page_size=(setting) ⇒ Object
This method updates the page size setting for a Restore object.
Parameters
- setting
-
The new value for the object setting. Should be an integer.
1631 1632 |
# File 'lib/src.rb', line 1631 def page_size=(setting) end |
#restore_mode ⇒ Object
This method retrieves the restore mode setting for a Restore object.
1733 1734 |
# File 'lib/src.rb', line 1733 def restore_mode end |
#restore_mode=(setting) ⇒ Object
This method updates the restore mode setting for a Restore object. This value affects whether the restore will overwrite an existing database.
Parameters
- setting
-
Either Restore::MODE_CREATE (default) or Restore::MODE_REPLACE.
1746 1747 |
# File 'lib/src.rb', line 1746 def restore_mode=(setting) end |
#use_all_space ⇒ Object
This method retrieves the use all space setting for a Restore object.
1753 1754 |
# File 'lib/src.rb', line 1753 def use_all_space end |
#use_all_space=(setting) ⇒ Object
This method updates the use all space setting for a Restore object. This value affects whether restore leaves space within the database file for expansion. This can be switched on for read only databases.
Parameters
- setting
-
True leave no default expansion space within the restored database file, false otherwise.
1766 1767 |
# File 'lib/src.rb', line 1766 def use_all_space=(setting) end |