Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to back up and recover bucketmetadata information

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to back up and restore bucket metadata information". The content is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article "how to back up and restore bucket metadata information".

one

View the list of metadata under bucket

To operate under ceph 10.2.9, take modifying the content_type attribute whose Object name is host as an example. All data operations are risky, so please proceed with caution.

Root@demohost:/home/demouser# radosgw-admin bi list-- bucket=test [{"type": "plain", "idx": "host", "entry": {"name": "host", # object name "instance": "", "ver": {"pool": 60 "epoch": 1}, "locator": "", "exists": "true", "meta": {"category": 1, "size": 254,254," mtime ":" 2017-08-30 07Vera 4616.956870Z " "etag": "99a8629776211452eb4b9c3e6333a426", "owner": "s3user", "owner_display_name": "s3user", "content_type": "text\ / plain", content_type attribute "accounted_size": 254} corresponding to # Object "tag": "0a6967a5-2c76-427a-99c6-8a788ca25034.54133.2084", "flags": 0, "pending_map": [], "versioned_epoch": 0}}] 2

View the bucketmetadata information of the corresponding Object

Root@demohost:/home/demouser# radosgw-admin bi get-bucket=test-object=host {"type": "plain", "idx": "host", "entry": {"name": "host", "instance": "", "ver": {"pool": 60, "epoch": 1}, "locator": "" "exists": "true", "meta": {"category": 1, "size": 254,254," mtime ":" 2017-08-300 07VR 46RA 16.956870Z "," etag ":" 99a8629776211452eb4b9c3e6333a426 "," owner ":" s3user "," owner_display_name ":" s3user " "content_type": "text\ / plain", "accounted_size": 254}, "tag": "0a6967a5-2c76-427a-99c6-8a788ca25034.54133.2084", "flags": 0, "pending_map": [] "versioned_epoch": 0}} root@demohost:/home/demouser# radosgw-admin bi get-- bucket=test-- object=host > host.bi # Export (backup) to local 3

Modify metadata of the corresponding Object

Root@demohost:/home/demouser# cat host.bi {"type": "plain", "idx": "host", "entry": {"name": "host", "instance": "", "ver": {"pool": 60, "epoch": 1}, "locator": "" "exists": "true", "meta": {"category": 1, "size": 254,254," mtime ":" 2017-08-300 07VR 46RA 16.956870Z "," etag ":" 99a8629776211452eb4b9c3e6333a426 "," owner ":" s3user "," owner_display_name ":" s3user " "content_type": "jpg\ / plain", # randomly changed jpg "accounted_size": 254}, "tag": "0a6967a5-2c76-427a-99c6-8a788ca25034.54133.2084", "flags": 0, "pending_map": [] "versioned_epoch": 0}} root@demohost:/home/demouser# radosgw-admin bi put-- bucket=test-- object=host < host.bi # Import modified content (restore) 4

View the result of modification

Root@demohost:/home/demouser# radosgw-admin bi get-bucket=test-object=host {"type": "plain", "idx": "host", "entry": {"name": "host", "instance": "", "ver": {"pool": 60, "epoch": 1}, "locator": "" "exists": "true", "meta": {"category": 1, "size": 254," mtime ":" 0.000000 "," etag ":" 99a8629776211452eb4b9c3e6333a426 "," owner ":" s3user "," owner_display_name ":" s3user " "content_type": "jpg\ / plain", # modification completed "accounted_size": 254}, "tag": "0a6967a5-2c76-427a-99c6-8a788ca25034.54133.2084", "flags": 0, "pending_map": [] "versioned_epoch": 0}} root@demohost:/home/demouser# radosgw-admin bi list-bucket=test [{"type": "plain", "idx": "host", "entry": {"name": "host", "instance": "", "ver": {"pool": 60 "epoch": 1}, "locator": "", "exists": "true", "meta": {"category": 1, "size": 254, "mtime": "0.000000", "etag": "99a8629776211452eb4b9c3e6333a426" "owner": "s3user", "owner_display_name": "u-n4999", "content_type": "jpg\ / plain", # modified "accounted_size": 254}, "tag": "0a6967a5-2c76-427a-99c6-8a788ca25034.54133.2084", "flags": 0 "pending_map": [], "versioned_epoch": 0}}] these are all the contents of the article "how to back up and restore bucketmetadata information" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report