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.



1600
1601
# File 'lib/src.rb', line 1600

def initialize(file, database)
end

Instance Attribute Details

#backup_fileObject

Attribute accessor.



1574
1575
1576
# File 'lib/src.rb', line 1574

def backup_file
  @backup_file
end

#databaseObject

Attribute accessor.



1574
1575
1576
# File 'lib/src.rb', line 1574

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.



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

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.



1655
1656
# File 'lib/src.rb', line 1655

def access_mode=(setting)
end

#build_indicesObject

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



1662
1663
# File 'lib/src.rb', line 1662

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.



1674
1675
# File 'lib/src.rb', line 1674

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.



1608
1609
# File 'lib/src.rb', line 1608

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.



1618
1619
# File 'lib/src.rb', line 1618

def cache_buffers=(setting)
end

#check_validityObject

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



1700
1701
# File 'lib/src.rb', line 1700

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.



1712
1713
# File 'lib/src.rb', line 1712

def check_validity=(setting)
end

#commit_tablesObject

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



1719
1720
# File 'lib/src.rb', line 1719

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.



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

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.



1787
1788
# File 'lib/src.rb', line 1787

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.



1797
1798
# File 'lib/src.rb', line 1797

def log
end

#no_shadowsObject

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



1681
1682
# File 'lib/src.rb', line 1681

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.



1693
1694
# File 'lib/src.rb', line 1693

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.



1626
1627
# File 'lib/src.rb', line 1626

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.



1636
1637
# File 'lib/src.rb', line 1636

def page_size=(setting)
end

#restore_modeObject

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



1738
1739
# File 'lib/src.rb', line 1738

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.



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

def restore_mode=(setting)
end

#use_all_spaceObject

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



1758
1759
# File 'lib/src.rb', line 1758

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.



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

def use_all_space=(setting)
end