Ask Your Question
0

how to backup cinder volumes to a remote swift store

asked 2015-02-19 20:20:48 -0600

eugene.goldberg gravatar image

I have two OpenStack servers:

the first one with IP 10.0.0.32 is running cinder, glance, nova, and neutron

the second one with IP 10.0.0.20 is only running swift and keystone

I'm trying to backup a cinder volume located on 10.0.0.32 to a swift store located on 10.0.0.20:

cinder --debug --os-username=admin --os-password=mast3r --os-tenant-name=admin --os-auth-url=http://10.0.0.20:5000/v2.0/ backup-create --container myfiles --display-name backup_vol-02 vol-02
DEBUG:keystoneclient.session:REQ: curl -i -X GET http://10.0.0.20:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [200] {'date': 'Fri, 20 Feb 2015 02:07:41 GMT', 'content-type': 'application/json', 'content-length': '612', 'vary': 'X-Auth-Token'} 
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://10.0.0.20:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/", "type": "text/html", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf", "type": "application/pdf", "rel": "describedby"}]}}

DEBUG:keystoneclient.auth.identity.v2:Making authentication request to http://10.0.0.20:5000/v2.0/tokens
ERROR: publicURL endpoint for volume service not found

As you can tell, I'm not getting very far.

On the swift host (10.0.0.20) I have confirmed having a functional swift install: I'm able to upload and download files like this:

swift -V 2.0 -A http://127.0.0.1:5000/v2.0 -U admin -K mast3r upload myfiles ps.txt

Here are my config files from the swift host (10.0.0.20):

proxy-server.conf:

[DEFAULT]
bind_port = 8080
user = swift

[pipeline:main]
pipeline = healthcheck cache authtoken keystoneauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true

[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swiftoperator

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true
# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = 10.0.0.20
auth_port = 35357
# the service tenant and swift username and password created in Keystone
admin_tenant_name = admin
admin_user = admin
admin_password = mast3r

[filter:cache]
use = egg:swift#memcache

[filter:catch_errors]
use = egg:swift#catch_errors

[filter:healthcheck]
use = egg:swift#healthcheck

container-server.conf:

[DEFAULT]

# Make sure your swift-ring-builder arguments match the bind_ip and bind_port.
# You almost certainly do not want to listen just on loopback unless testing.
# However, you want to keep port 6201 if SElinux is enabled.
bind_ip = 0.0.0.0
bind_port = 6001

workers = 2

[pipeline:main]
pipeline = container-server

[app:container-server]
use = egg:swift#container

[container-replicator]

[container-updater]

[container-auditor]

[container-sync]

account-server.conf:

[DEFAULT]

# Make sure your swift-ring-builder arguments match the bind_ip and bind_port.
# You almost certainly do not want to listen just on loopback unless testing.
# However, you want to ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-20 03:35:08 -0600

rahuk gravatar image

updated 2015-02-20 03:39:23 -0600

You need to run cinder-backup on the host or the node where is cinder-volume running, too.

And you need the config entries for Swift in your /etc/cinder/cinder.conf:

#SWIFT
backup_driver = cinder.backup.drivers.swift
backup_swift_url = http://<proxy-server>:8080/v1/AUTH_
backup_swift_auth = per_user
backup_swift_user = swift
backup_swift_key = <password>
backup_swift_container = volumebackups
backup_swift_object_size = 52428800
backup_swift_retry_attempts = 3
backup_swift_retry_backoff = 2
backup_compression_algorithm = zlib

You can activate Cinder-Backup in horizon by editing the /etc/openstack-dashboard/local_settings.py file. Set the Option at line 176 to True:

OPENSTACK_CINDER_FEATURES = {
    'enable_backup': True,
}

After you have set the entries in the configs dont forget to restart all the services!

regards, rahuk

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-02-19 20:20:48 -0600

Seen: 465 times

Last updated: Feb 20 '15