Methods

Class/Module Index [+]

Quicksearch

Backup::Database::Redis

Attributes

additional_options[RW]

Additional “redis-cli” options

host[RW]

Connectivity options for the invoke_save option.

invoke_save[RW]

Determines whether Backup should invoke the `SAVE` command through the `redis-cli` utility to persist the most recent data before copying the dump file specified by path and name.

name[RW]

Name of the redis dump file.

This is set in `redis.conf` as `dbfilename`. This must be set to the name of that file without the `.rdb` extension. Default: ‘dump’

password[RW]

Password for the redis-cli utility to perform the `SAVE` command if invoke_save is set `true`.

path[RW]

Path to the redis dump file.

This is set in `redis.conf` as `dir`.

port[RW]

Connectivity options for the invoke_save option.

socket[RW]

Connectivity options for the invoke_save option.

Public Class Methods

new(model, database_id = nil, &block) click to toggle source
# File lib/backup/database/redis.rb, line 40
def initialize(model, database_id = nil, &block)
  super
  instance_eval(&block) if block_given?

  @name ||= 'dump'
end

Public Instance Methods

perform!() click to toggle source

Copies and optionally compresses the Redis dump file to the dump_path using the dump_filename.

<trigger>/databases/Redis[-<database_id>].rdb[.gz]

If invoke_save is true, `redis-cli SAVE` will be invoked.

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

  invoke_save! if invoke_save
  copy!

  log!(:finished)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.