Methods

Class/Module Index [+]

Quicksearch

Backup::Database::Redis

Attributes

additional_options[RW]

Additional "redis-cli" options

host[RW]

Connectivity options

invoke_save[RW]

Determines whether Backup should invoke the SAVE command through the 'redis-cli' utility to persist the most recent data before copying over the dump file

name[RW]

Name of and path to the database that needs to get dumped

password[RW]

Credentials for the specified database

path[RW]

Name of and path to the database that needs to get dumped

port[RW]

Connectivity options

redis_cli_utility[RW]

Path to the redis-cli utility (optional)

socket[RW]

Connectivity options

Public Class Methods

new(model, &block) click to toggle source

Creates a new instance of the Redis database object

# File lib/backup/database/redis.rb, line 38
def initialize(model, &block)
  super(model)

  @additional_options ||= Array.new

  instance_eval(&block) if block_given?

  @name ||= 'dump'
  @redis_cli_utility ||= utility('redis-cli')
end

Public Instance Methods

perform!() click to toggle source

Performs the Redis backup by using the 'cp' unix utility to copy the persisted Redis dump file to the Backup archive. Additionally, when 'invoke_save' is set to true, it'll tell the Redis server to persist the current state to the dump file before copying the dump to get the most recent updates in to the backup

# File lib/backup/database/redis.rb, line 55
def perform!
  super

  invoke_save! if invoke_save
  copy!
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.