Freezer: mismatch in backup-name between backup and restore ?

Bug #1834742 reported by Maffioletti Sergio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

 $ freezer-agent --version
7.1.0

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

Running backup towards in-house OpenStack/Swift installation.

Backup:
$ freezer-agent --path-to-backup "/projects/" --container backup_projects --storage swift -d --timeout 240 --max-segment-size 1073741824 --log-file /var/tmp/freezer.log --engine rsync --log-dir /var/tmp --backup-name projects

Info:
$ freezer-agent --action info --container backup_projects
+-----------------+-------+--------------+
| Container | Size | Object Count |
+-----------------+-------+--------------+
| backup_projects | 11 GB | 19 |
+-----------------+-------+--------------+

but when I try to restore the backup:
$ freezer-agent --action restore --container backup_projects --storage swift --restore-abs-path /tmp/restore --backup-name projects --log-file /var/tmp/freezer_restore.log
Critical Error: No matching backup name "monitor001_projects" found

even if I try to explicitly prefix the hostname to the backup name like:
$ freezer-agent --action restore --container backup_projects --storage swift --restore-abs-path /tmp/restore --backup-name monitor001_projects --log-file /var/tmp/freezer_restore.log
Critical Error: No matching backup name "monitor001_monitor001_projects" found

am I missing something ?
here's the content of the restore log:
```
2019-06-29 16:36:34.085 3863 INFO freezer.main [-] Begin freezer agent process with args: ['/usr/local/bin/freezer-agent', '--action', 'restore', '--container', 'backup_projects', '--storage', 'swift', '--restore-abs-path', '/tmp/restore', '--backup-name', 'projects', '--log-file', '/var/tmp/freezer_restore.log', '-d']
2019-06-29 16:36:34.085 3863 INFO freezer.main [-] log file at /var/tmp/freezer_restore.log
2019-06-29 16:36:34.085 3863 INFO freezer.openstack.osclients [-] Authenticating with Keystone version: 2.0, auth_url: https://sanitized_aut_point:5000/v2.0, username: sanitized_user_name, project: sanitized_project_name
2019-06-29 16:36:34.117 3863 DEBUG keystoneclient.auth.identity.v2 [-] Making authentication request to https://sanitized_aut_point:5000/v2.0/tokens get_auth_ref /usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/v2.py:85
2019-06-29 16:36:34.305 3863 DEBUG swiftclient [-] REQ: curl -i https://sanitized_aut_point:8080/v1/AUTH_sanitized_aut?format=json -X GET -H "Accept-Encoding: gzip" -H "X-Auth-Token: a8a7e4546f644078..." http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:180
2019-06-29 16:36:34.306 3863 DEBUG swiftclient [-] RESP STATUS: 200 OK http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:181
2019-06-29 16:36:34.306 3863 DEBUG swiftclient [-] RESP HEADERS: {u'X-Account-Storage-Policy-Replica-2-Object-Count': u'5775', u'Content-Length': u'713', u'X-Account-Meta-Quota-Bytes': u'10995116277760', u'x-account-project-domain-id': u'_unknown', u'X-Account-Object-Count': u'5775', u'X-Account-Storage-Policy-Replica-2-Bytes-Used': u'1834135357364', u'X-Account-Storage-Policy-Replica-2-Container-Count': u'12', u'X-Timestamp': u'1465975022.48877', u'X-Trans-Id': u'txc7a06979c43c4bf693baf-005d179392', u'Date': u'Sat, 29 Jun 2019 16:36:34 GMT', u'X-Account-Bytes-Used': u'1834135357364', u'X-Account-Container-Count': u'12', u'Content-Type': u'application/json; charset=utf-8', u'Accept-Ranges': u'bytes'} http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:182
2019-06-29 16:36:34.307 3863 DEBUG swiftclient [-] RESP BODY: [{"count": 154, "bytes": 161483458008, "name": "backup_archive"}, {"count": 0, "bytes": 0, "name": "backup_bbvolume"}, {"count": 0, "bytes": 0, "name": "backup_data"}, {"count": 0, "bytes": 0, "name": "backup_homes"}, {"count": 3218, "bytes": 937082070010, "name": "backup_jwindh"}, {"count": 19, "bytes": 11978440183, "name": "backup_projects"}, {"count": 103, "bytes": 108006387533, "name": "backup_tumorprofiler"}, {"count": 1767, "bytes": 236693546324, "name": "bblab_data"}, {"count": 4, "bytes": 13082, "name": "data-public"}, {"count": 0, "bytes": 0, "name": "freezer_backups"}, {"count": 19, "bytes": 477422515, "name": "freezer_sm_backup"}, {"count": 491, "bytes": 378414019709, "name": "tumorprofiler"}] http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:186
2019-06-29 16:36:34.313 3863 INFO freezer.openstack.osclients [-] Authenticating with Keystone version: 2.0, auth_url: https://sanitized_aut_point:5000/v2.0, username: sanitized_user_name, project: sanitized_project_name
2019-06-29 16:36:34.360 3863 INFO freezer.job [-] Validating args for the restore job.
2019-06-29 16:36:34.360 3863 INFO freezer.main [-] Job execution Started at: 2019-06-29 16:36:34
2019-06-29 16:36:34.360 3863 INFO freezer.job [-] Executing Restore...
2019-06-29 16:36:34.361 3863 INFO freezer.engine.engine [-] Creating restore path: /tmp/restore
2019-06-29 16:36:34.361 3863 INFO freezer.engine.engine [-] Restore path creation completed
2019-06-29 16:36:34.362 3863 DEBUG keystoneclient.auth.identity.v2 [-] Making authentication request to https://sanitized_aut_point:5000/v2.0/tokens get_auth_ref /usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/v2.py:85
2019-06-29 16:36:34.557 3863 DEBUG swiftclient [-] REQ: curl -i https://sanitized_aut_point:8080/v1/AUTH_sanitized_aut/backup_projects?format=json&prefix=metadata/tar/monitor001_projects/&delimiter=/ -X GET -H "Accept-Encoding: gzip" -H "X-Auth-Token: 4e2a30f3ccaf4ff1..." http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:180
2019-06-29 16:36:34.558 3863 DEBUG swiftclient [-] RESP STATUS: 200 OK http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:181
2019-06-29 16:36:34.558 3863 DEBUG swiftclient [-] RESP HEADERS: {u'Content-Length': u'2', u'X-Container-Object-Count': u'26', u'Accept-Ranges': u'bytes', u'X-Storage-Policy': u'replica-2', u'Date': u'Sat, 29 Jun 2019 16:36:34 GMT', u'X-Timestamp': u'1561763900.26764', u'X-Trans-Id': u'txdb5c3ba4a286448b886a6-005d179392', u'X-Container-Bytes-Used': u'19318831265', u'Content-Type': u'application/json; charset=utf-8'} http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:182
2019-06-29 16:36:34.559 3863 DEBUG swiftclient [-] RESP BODY: [] http_log /usr/local/lib/python2.7/dist-packages/swiftclient/client.py:186
2019-06-29 16:36:34.559 3863 ERROR freezer.main [-] No matching backup name "monitor001_projects" found: IndexError: No matching backup name "monitor001_projects" found
2019-06-29 16:36:34.559 3863 ERROR freezer.main Traceback (most recent call last):
2019-06-29 16:36:34.559 3863 ERROR freezer.main File "/usr/local/lib/python2.7/dist-packages/freezer/main.py", line 271, in main
2019-06-29 16:36:34.559 3863 ERROR freezer.main freezer_main(backup_args)
2019-06-29 16:36:34.559 3863 ERROR freezer.main File "/usr/local/lib/python2.7/dist-packages/freezer/main.py", line 138, in freezer_main
2019-06-29 16:36:34.559 3863 ERROR freezer.main return run_job(backup_args, storage)
2019-06-29 16:36:34.559 3863 ERROR freezer.main File "/usr/local/lib/python2.7/dist-packages/freezer/main.py", line 151, in run_job
2019-06-29 16:36:34.559 3863 ERROR freezer.main response = freezer_job.execute()
2019-06-29 16:36:34.559 3863 ERROR freezer.main File "/usr/local/lib/python2.7/dist-packages/freezer/job.py", line 393, in execute
2019-06-29 16:36:34.559 3863 ERROR freezer.main backup_media=conf.mode)
2019-06-29 16:36:34.559 3863 ERROR freezer.main File "/usr/local/lib/python2.7/dist-packages/freezer/engine/engine.py", line 252, in restore
2019-06-29 16:36:34.559 3863 ERROR freezer.main recent_to_date=recent_to_date)
2019-06-29 16:36:34.559 3863 ERROR freezer.main File "/usr/local/lib/python2.7/dist-packages/freezer/storage/base.py", line 101, in get_latest_level_zero_increments
2019-06-29 16:36:34.559 3863 ERROR freezer.main raise IndexError(err_msg)
2019-06-29 16:36:34.559 3863 ERROR freezer.main IndexError: No matching backup name "monitor001_projects" found
2019-06-29 16:36:34.559 3863 ERROR freezer.main
2019-06-29 16:36:34.560 3863 CRITICAL freezer.main [-] Run freezer agent process unsuccessfully: IndexError: No matching backup name "monitor001_projects" found
2019-06-29 16:36:34.560 3863 CRITICAL freezer.main [-] Critical Error: No matching backup name "monitor001_projects" found
: IndexError: No matching backup name "monitor001_projects" found
```

Tags: swift
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.