Class: Rubyfb::Restore

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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.



1670
1671
# File 'lib/src.rb', line 1670

def initialize(file, database)
end

Instance Attribute Details

#backup_fileObject

Attribute accessor.



1644
1645
1646
# File 'lib/src.rb', line 1644

def backup_file
  @backup_file
end

#databaseObject

Attribute accessor.



1644
1645
1646
# File 'lib/src.rb', line 1644

def database
  @database
end

Instance Method Details

#access_modeObject

This method retrieves the access mode setting for a Restore object. This will be nil until a value is actual set.



1714
1715
# File 'lib/src.rb', line 1714

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.



1725
1726
# File 'lib/src.rb', line 1725

def access_mode=(setting)
end

#build_indicesObject

This method retrieves the build indices setting for a Restore object.



1732
1733
# File 'lib/src.rb', line 1732

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.



1744
1745
# File 'lib/src.rb', line 1744

def build_indices=(setting)
end

#cache_buffersObject

This method retrieves the cache buffers setting for a Restore object. This will be nil until a value is actual set.



1678
1679
# File 'lib/src.rb', line 1678

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.



1688
1689
# File 'lib/src.rb', line 1688

def cache_buffers=(setting)
end

#check_validityObject

This method retrieves the validity checks setting for a Restore object.



1770
1771
# File 'lib/src.rb', line 1770

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.



1782
1783
# File 'lib/src.rb', line 1782

def check_validity=(setting)
end

#commit_tablesObject

This method retrieves the commit tables setting for a Restore object.



1789
1790
# File 'lib/src.rb', line 1789

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.



1801
1802
# File 'lib/src.rb', line 1801

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.



1857
1858
# File 'lib/src.rb', line 1857

def execute(manager)
end

#logObject

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.



1867
1868
# File 'lib/src.rb', line 1867

def log
end

#no_shadowsObject

This method retrieves the no shadows setting for a Restore object.



1751
1752
# File 'lib/src.rb', line 1751

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.



1763
1764
# File 'lib/src.rb', line 1763

def no_shadows=(setting)
end

#page_sizeObject

This method retrieves the page size setting for a Restore object. This will be nil until a value is actual set.



1696
1697
# File 'lib/src.rb', line 1696

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.



1706
1707
# File 'lib/src.rb', line 1706

def page_size=(setting)
end

#restore_modeObject

This method retrieves the restore mode setting for a Restore object.



1808
1809
# File 'lib/src.rb', line 1808

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.



1821
1822
# File 'lib/src.rb', line 1821

def restore_mode=(setting)
end

#use_all_spaceObject

This method retrieves the use all space setting for a Restore object.



1828
1829
# File 'lib/src.rb', line 1828

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.



1841
1842
# File 'lib/src.rb', line 1841

def use_all_space=(setting)
end