odoo-cloud-platform
odoo-cloud-platform copied to clipboard
add(attachment_s3): partition fn
Not sure if there is any interest in this feature. Seems like would be useful but perhaps other tooling is used.
Objective: partition the file store into a set of chucks easier to manage.
adding a customizable partitioning function (date, id range ?) on the files make backup much easier. you may have drops in the past. But should never miss a file as the creates are ordinal, with the right partition fn. then the sync to other environments just need the new partitions, not millions of moves each time.
review/suggestions?
just looking and this should not self install like that?
period=$(date +%Y-%m)
➜ strapi git:(titan/fix-files-uri) ✗ rclone copyto do_prod:${prod_bucket}/${period}/ do_staging:${other envs}/${period}/ --progress
should be much less intensive sync and archive.
y,cnt,size_total
2022-01,14924,751845829
2022-02,14633,880372327
2022-03,27232,2825859897
2022-04,32789,2875873528
2022-05,32882,3557035499
2022-06,30060,3019123692
2022-07,24816,2683203413
2022-08,3564,465700135
cc: @max3903 @vrenaville
in scripting the history move/update. I realized all the common checksums currently have a single file. I guess the options are to continue that with a ref on the attachment to the earlier one sharing checksum. possibly older but would follow logic if set back. or a put would make another copy in the current partition sub-folder.
@dnplkndll thanks for your PR, but actually I think it's better to manage this "outside" of odoo, you can manage it with external tools : for backup by exemple https://restic.net/
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.