Nextcloud S3 primary storage
编辑配置文件 nextcloud/config/config.php
,在最下方添加以下配置:
//S3 as internal storage
'objectstore' => array(
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'bucket-name',
'key' => 'keygoeshere',
'secret' => 'secret-goes-here',
'hostname' => 'example.com',
'use_ssl' => true,
'use_path_style'=>true,
),
),
注意:hostname 不应使用
https
这样的协议前缀,应直接写域名部分。
About Reinstall
Nextcloud 在使用对象存储作为 primary storage 时,首先会完全独占 bucket,其次文件的元数据等信息不会写入对象存储,那些信息会在上传时存储到数据库中。因此,定期备份 config/config.php
和 数据库
是至关重要的,如果没有这两个备份,几乎没有办法恢复数据访问。
Member discussion