diff --git a/Gateway-to-Remote-Object-Storage.md b/Gateway-to-Remote-Object-Storage.md index d30a80c..0dcee88 100644 --- a/Gateway-to-Remote-Object-Storage.md +++ b/Gateway-to-Remote-Object-Storage.md @@ -2,6 +2,7 @@ The [[Mount Remote Storage]] feature can mount one remote storage folder to one local folder. ``` +# in "weed shell" > remote.mount -dir=/xxx -remote=cloud1/bucket ``` @@ -17,11 +18,29 @@ The `weed filer.remote.sync` added a few of features: To do so, the `weed filer.remote.sync` process needs to know the default remote storage to create the new bucket. # Usage -## Mount all existing remote buckets to local -TBD +## Mount all existing remote buckets as local buckets + +``` +# in "weed shell" +> remote.mount.buckets -remote=cloud1 -apply +``` ## Upload local changes in `/buckets` +This will also create new buckets in the specified remote storage. ``` $ weed filer.remote.sync -createBucketAt=cloud1 synchronize /buckets, default new bucket creation in cloud1 ... ``` + +## Cache or uncache +The basic implementation mechanism is the same as other mounted folders. +You may need to create a cronjob to run it periodically. +``` +# in "weed shell" + +# cache all pdf files in a bucket +> remote.cache -dir=/buckets/some-bucket -include=*.pdf + +# uncache files in a bucket that is older than 1 hour and larger than 10KB +> remote.uncache -dir=/buckets/some-b353 -minAge=3600 -minSize=10240 +```