Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to back up and recover bucketmetadata information

Shulou Source: shulou.com Published: 2022-06-01 00:37:32 10月03日 Update

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!

Tags: Data information backup content articles names attributes learning help easy to understand more organization knowledge results editing industry information information channels facets channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MySQL Microsoft vpn MariaDB