Method: Backup::Database::Riak#perform!
- Defined in:
- lib/backup/database/riak.rb
#perform! ⇒ Object
Performs the dump using ‘riak-admin backup`.
This will be stored in the final backup package as <trigger>/databases/<dump_filename>-<node>
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/backup/database/riak.rb', line 36 def perform! super dump_file = File.join(dump_path, dump_filename) with_riak_owned_dump_path do run("#{ riakadmin } backup #{ node } #{ } '#{ dump_file }' node") end model.compressor.compress_with do |command, ext| dump_file << "-#{ node }" # `riak-admin` appends `node` to the filename. run("#{ command } -c '#{ dump_file }' > '#{ dump_file + ext }'") FileUtils.rm_f(dump_file) end if model.compressor log!(:finished) end |