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.


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

def initialize(file, database)
end

Instance Attribute Details

#backup_fileObject

Attribute accessor.


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

def backup_file
  @backup_file
end

#databaseObject

Attribute accessor.


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

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.


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

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.


1735
1736
# File 'lib/src.rb', line 1735

def access_mode=(setting)
end

#build_indicesObject

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


1742
1743
# File 'lib/src.rb', line 1742

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.


1754
1755
# File 'lib/src.rb', line 1754

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.


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

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.


1698
1699
# File 'lib/src.rb', line 1698

def cache_buffers=(setting)
end

#check_validityObject

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


1780
1781
# File 'lib/src.rb', line 1780

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.


1792
1793
# File 'lib/src.rb', line 1792

def check_validity=(setting)
end

#commit_tablesObject

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


1799
1800
# File 'lib/src.rb', line 1799

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.


1811
1812
# File 'lib/src.rb', line 1811

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.


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

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.


1877
1878
# File 'lib/src.rb', line 1877

def log
end

#no_shadowsObject

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


1761
1762
# File 'lib/src.rb', line 1761

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.


1773
1774
# File 'lib/src.rb', line 1773

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.


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

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.


1716
1717
# File 'lib/src.rb', line 1716

def page_size=(setting)
end

#restore_modeObject

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


1818
1819
# File 'lib/src.rb', line 1818

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.


1831
1832
# File 'lib/src.rb', line 1831

def restore_mode=(setting)
end

#use_all_spaceObject

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


1838
1839
# File 'lib/src.rb', line 1838

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.


1851
1852
# File 'lib/src.rb', line 1851

def use_all_space=(setting)
end