Permalink
Browse files

enforce backup dir on the same mount point

  • Loading branch information...
ronniedada committed Aug 20, 2013
1 parent 6ba4122 commit a4496de1e7e2717d9b19f2d8d2876fc59d5b42be
Showing with 2 additions and 2 deletions.
  1. +2 −2 cookbooks/couchbase/recipes/restore-2.1.1.rb
@@ -18,7 +18,7 @@
node[:block_device][:devices][:device1].nil? or
node[:block_device][:devices][:device1][:mount_point].nil?)
mount_point = node[:block_device][:devices][:device1][:mount_point]
new_dir = "#{mount_point}" << "_back"
new_dir = "#{mount_point}" << "/back"
execute "moving data to a backup location: #{mount_point} -> #{new_dir}" do
command("cd #{mount_point} && mkdir #{new_dir} && mv *couch* #{new_dir} && " +
" mv #{node[:db_couchbase][:bucket][:name]} #{new_dir}")
@@ -129,7 +129,7 @@
node[:block_device][:devices][:device1].nil? or
node[:block_device][:devices][:device1][:mount_point].nil?)
mount_point = node[:block_device][:devices][:device1][:mount_point]
new_dir = "#{mount_point}" << "_back"
new_dir = "#{mount_point}" << "/back"
execute "restoring data from a backup location: #{new_dir} -> #{mount_point}" do
command("/etc/init.d/couchbase-server stop && cd #{mount_point} && " +
" rm -rf #{node[:db_couchbase][:bucket][:name]} && " +

0 comments on commit a4496de

Please sign in to comment.