Class: IBRuby::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 InterBase 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.



1594
1595
# File 'lib/src.rb', line 1594

def initialize(file, database)
end

Instance Attribute Details

#backup_fileObject

Attribute accessor.



1568
1569
1570
# File 'lib/src.rb', line 1568

def backup_file
  @backup_file
end

#databaseObject

Attribute accessor.



1568
1569
1570
# File 'lib/src.rb', line 1568

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.



1638
1639
# File 'lib/src.rb', line 1638

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.



1649
1650
# File 'lib/src.rb', line 1649

def access_mode=(setting)
end

#build_indicesObject

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



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

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.



1668
1669
# File 'lib/src.rb', line 1668

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.



1602
1603
# File 'lib/src.rb', line 1602

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.



1612
1613
# File 'lib/src.rb', line 1612

def cache_buffers=(setting)
end

#check_validityObject

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



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

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.



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

def check_validity=(setting)
end

#commit_tablesObject

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



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

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.



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

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

IBRubyException

Generated whenever a disconnected service manager

is specified or a problem occurs executing the
task.


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

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.



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

def log
end

#no_shadowsObject

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



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

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.



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

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.



1620
1621
# File 'lib/src.rb', line 1620

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.



1630
1631
# File 'lib/src.rb', line 1630

def page_size=(setting)
end

#restore_modeObject

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



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

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.



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

def restore_mode=(setting)
end

#use_all_spaceObject

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



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

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.



1765
1766
# File 'lib/src.rb', line 1765

def use_all_space=(setting)
end