Skip to content

Backup specific devices #2

@nitinmohan87

Description

@nitinmohan87

Have a 'device' attribute for rightscale_backup resource which specifies what device to back up. At this moment, we backup all devices by default due to issues with RightScale API Backup resource and the design of this cookbook.

Suppose I have 2 volumes - "volume1" and "volume2" attached to an instance at "/dev/xvdg" and "/dev/xvdf" respectively. Now I create a backup as follows

rightscale_backup "my_backup" do
  lineage "test_lineage"
  devices ["/dev/xvdg", "/dev/xvdh"]
  action :create
end

The parameters to backup create API call are

params = {
  : backup => {
    :lineage => @new_resource.lineage,  # will be "test_lineage"
    :name => @new_resource.name,        # will be "my_backup"
    :volume_attachment_hrefs => hrefs   # will be an array of hrefs of volumes attached at ["/dev/xvdg", "/dev/xvdh"]
  }
}

After the backup is complete, I now end up with 2 snapshots both named "my_backup" in "test_lineage" lineage. When I restore this backup (containing 2 snapshots) I end up with 2 volumes attached to the instance with the same name "my_backup". Now, we cannot update the volume attributes in the node variable because the volumes have same name which causes a conflict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions