Hi,
We use amazon S3 to store all documents and images used by Cyclos.
First, we used one bucket to store all images in one region. Then, we decided to create another bucket in another region and setup cyclos to use this new bucket for all images. We had no problem with this configuration. Works fine. But it only stores the new images in the new bucket.
We want to copy images from the first bucket to the second one and change the links of images from the first bucket to the new bucket. Is this possible? If yes, how can we do it?
Amazon S3 bucket migration
Moderators: hugo, alexandre, rmvanarkel
Amazon S3 bucket migration
Thanks for your kind attention.
Best regards,
JAR
Best regards,
JAR
Re: Amazon S3 bucket migration
Hi,
You should first move/copy the files to the new bucket (without changing the file names) using the AWS console.
Later, you need to update the stored_files table to point to the new bucket. Suppose the old bucket name is: old_bucket and the new one is new_bucket, then you can run the following SQL statement:
Regards.
You should first move/copy the files to the new bucket (without changing the file names) using the AWS console.
Later, you need to update the stored_files table to point to the new bucket. Suppose the old bucket name is: old_bucket and the new one is new_bucket, then you can run the following SQL statement:
Code: Select all
UPDATE stored_files SET metadata = replace(metadata, 'old_bucket/', 'new_bucket/')
WHERE position('old_bucket/' in metadata) > 0;
Andrés Meyer
Cyclos development team
Cyclos development team