--- title: "Export logs to Object Storage" description: "Send a running MySQL, MariaDB, or PostgreSQL DBaaS instance's logs to an E2E Object Storage bucket." content_type: "how-to" product: "database" platform: "MyAccount" url: "/myaccount/database/how-to/export-logs-to-object-storage/" topic: ["backup-and-recovery"] relationships: {"requires":["/myaccount/object-storage/how-to/create-a-bucket/","/myaccount/object-storage/how-to/generate-an-access-key/"]} --- # Export logs to Object Storage Export a DBaaS instance's logs to an E2E Object Storage bucket to keep a copy of them that MyAccount updates every 24 hours. The portal calls Object Storage EOS. ## Before you begin You need: - A DBaaS instance that is **Running**. - A bucket in the same region as the DBaaS instance; see [Create a bucket](/myaccount/object-storage/how-to/create-a-bucket/). - An access key and secret key for the bucket; see [Generate an access key](/myaccount/object-storage/how-to/generate-an-access-key/). ## Turn on log export 1. From the DBaaS instance's **More Actions** menu, click **Export Logs to EOS**. 2. Enter the **EOS Bucket** name, the **Access Key**, and the **Secret Key**, and check each one: logs reach the bucket when all three are correct. Keep your own copy of the keys: E2E does not store them. 3. Click **Enable**. MyAccount sends the logs already on the DBaaS instance to the bucket, then new logs every 24 hours. In the **More Actions** menu, **Disable Log Export** now takes the place of **Export Logs to EOS**. Deleting the bucket later deletes the logs already sent to it. The bucket's own lifecycle rule sets how long exported logs stay there; see [Set a lifecycle rule](/myaccount/object-storage/how-to/set-a-lifecycle-rule/). ## Turn off log export From the DBaaS instance's **More Actions** menu, click **Disable Log Export**, then click **Yes**. Future logs stop going to the bucket, and the logs already exported stay there. With log export on, the DBaaS instance's logs collect in your bucket. To back up the data as well, take a snapshot; see [Back up and restore a DBaaS instance with snapshots](/myaccount/database/how-to/create-and-restore-a-snapshot/).