CloudSQL point-in-time - where is the Cloud Storage bucket??

Hi,

According to this article, the WAL archive should be saved in our Cloud Storage of the same project. However, I don't see any bucket that might hold this data.
It is enabled and when I use the `show archive_command` I'm getting the following: 

/utils/replication_log_processor -disable_log_to_disk -action=archive -file_name=%f -local_file_path=%p -async_archive -remote_storage

So it seems fine and it should be saved in the cloud storage. 

Am I missing something? Where is the bucket?

Solved Solved
0 2 1,196
1 ACCEPTED SOLUTION

As per the Google Cloud documentation, the write-ahead logs (WAL) for point-in-time recovery are stored in Cloud Storage in the same region as the instances. However, this is applicable for new Cloud SQL instances that have point-in-time recovery enabled or for existing instances that enable point-in-time recovery after this feature for storing WAL logs in Cloud Storage is available.

To check if an instance's logs are stored in Cloud Storage, you can check the bytes_used_by_data_type metric for the instance. If the value for the archived_wal_log data type is 0, the instance's logs are stored in Cloud Storage.

After connecting to a database of the instance using a PostgreSQL client such as psql or pgAdmin, you can run the command show archive_command. If any WALs are archived in Cloud Storage, then you'll see -async_archive -remote_storage.

As for the Cloud Storage bucket that holds the WAL archives for CloudSQL instances, it is not publicly accessible. The bucket name is randomly generated, and it is not possible to determine the bucket name for a specific CloudSQL instance.

If you need to access the WAL archives for your CloudSQL instance, you can contact Google Cloud Support. They will be able to provide you with the bucket name and access credentials.

View solution in original post

2 REPLIES 2

As per the Google Cloud documentation, the write-ahead logs (WAL) for point-in-time recovery are stored in Cloud Storage in the same region as the instances. However, this is applicable for new Cloud SQL instances that have point-in-time recovery enabled or for existing instances that enable point-in-time recovery after this feature for storing WAL logs in Cloud Storage is available.

To check if an instance's logs are stored in Cloud Storage, you can check the bytes_used_by_data_type metric for the instance. If the value for the archived_wal_log data type is 0, the instance's logs are stored in Cloud Storage.

After connecting to a database of the instance using a PostgreSQL client such as psql or pgAdmin, you can run the command show archive_command. If any WALs are archived in Cloud Storage, then you'll see -async_archive -remote_storage.

As for the Cloud Storage bucket that holds the WAL archives for CloudSQL instances, it is not publicly accessible. The bucket name is randomly generated, and it is not possible to determine the bucket name for a specific CloudSQL instance.

If you need to access the WAL archives for your CloudSQL instance, you can contact Google Cloud Support. They will be able to provide you with the bucket name and access credentials.

OK, the last two paragraphs were enough 🙂 I added a link to the article, so you can assume I read it, you don't have to copy paste the whole thing.

Thanks anyway.