https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • k

    kian

    05/22/2023, 3:21 PM
    network usage? $0
  • k

    kian

    05/22/2023, 3:21 PM
    R2 charges per operation, not bandwidth
  • a

    Autarch

    05/22/2023, 3:24 PM
    for example i have patcher and up to 200files about 2gb size patching from beginning. 4000 users using patcher per month
  • a

    Autarch

    05/22/2023, 3:24 PM
    dont know if it will be costing fortune or small amount so
  • n

    Nova+

    05/22/2023, 3:47 PM
    if each 4000 users download 200 files every month 200 * 4000 = 800_000 requests, r2 gives you 10mil requests for free bandwidth is free so you will only pay for the storage, if files are under 10GB, it it will completely free
  • d

    denisep

    05/22/2023, 4:25 PM
    Happy Monday! I hope everyone had a great weekend and enjoyed Developer Week last week. 😁 Friendly reminder that the R2 documentation survey is open through this Friday, 5/26. https://docs.google.com/forms/d/e/1FAIpQLScaVrdZh2PoZFvJGFPyMthuGVvKpQvoPfZ-BxIJ4Q5zsQebDA/viewform If you could take 3 minutes of your time to fill it out, I'd greatly appreciate it! I'm really looking forward to taking the feedback and using it to create actionable items to improve our docs experience for our users. Thanks again!
  • l

    Lone Wolf

    05/22/2023, 5:32 PM
    Yeah i did this sums and even with the masses of downloads and uploads its about $30
  • r

    Ryder Cragie

    05/22/2023, 7:49 PM
    Can I connect to R2 via WebDAV?
  • j

    James

    05/22/2023, 7:52 PM
    Not natively, as far as I know. You might be able to find some kind of gateway that acts as a webdav proxy to your R2 bucket, but I'm not familiar with any directly.
  • t

    tt2468

    05/22/2023, 10:42 PM
    Is there a way to upload files to a bucket via rclone without needing to specify a subdirectory?
  • t

    tt2468

    05/22/2023, 10:42 PM
    rclone sync . r2-instance-debs:instance-debs/
    works, and syncs to a subdirectory, but if I try
    rclone sync . r2-instance-debs:
    like the docs suggest, it errors out with
    Copy code
    2023/05/22 15:37:56 ERROR : Attempt 2/3 failed with 1 errors and: InvalidParameter: 1 validation error(s) found.
    - minimum field size of 1, HeadObjectInput.Key.
  • t

    tt2468

    05/22/2023, 10:47 PM
    Got it. S3 API url given by the cloudflare dashboard includes the path to the bucket already, and rclone is apparently only supposed to have the base URL
  • t

    tt2468

    05/22/2023, 10:47 PM
    the docs do not mention this, and probably should
  • k

    Karew

    05/22/2023, 11:13 PM
    For rclone remotes, the first part of the path is usually the bucket. Rclone can create or remove whole buckets for you, kind of folder-like. So if you try to sync to
    remote:
    instead of
    remote:bucket
    it’s trying to create buckets for you
  • k

    Karew

    05/22/2023, 11:14 PM
    (Which is probably the wrong thing 95% of the time)
  • s

    Sid | R2

    05/23/2023, 6:02 AM
    Does
    rclone sync . r2-instance-debs:/
    not work? (I haven't checked)
  • h

    hansw

    05/23/2023, 6:53 AM
    Anyone got similar issues with
    rclone
    ? Am able to upload files to R2 via
    rclone sync /local/path/folder1 r2-bucket:folder1
    . (Although the UI seems weirdly showing additional
    folder1
    file with 0B next to the real folder directory of
    folder1
    . But
    rclone ls
    rclone tree
    ...etc never work, the program just existed right away and shows 0 output. (No error prints). While I am able to sync to remote, I have scenarios to sync it back from R2 to local. But no matter how I do the command
    rclone sync r2-bucket:folder1 /local/path/folder1
    never works 😦 Curious if anyone have any insights on why those won't work, and what will be the workaround for R2? Thanks 🙏
  • s

    Sid | R2

    05/23/2023, 7:09 AM
    Can you run your command with
    -vv
    to print verbose logs?
  • t

    tt2468

    05/23/2023, 7:14 AM
    It does not for me
  • k

    Karew

    05/23/2023, 7:27 AM
    What are you trying to do exactly? Are you trying to sync like 3 folders → Three different buckets, or an entire directory structure to one bucket?
  • h

    hansw

    05/23/2023, 7:27 AM
    Copy code
    % rclone sync -vv r2-bucket:dumps ./tests/dumps
    DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "sync" "-vv" "r2-bucket:dumps" "./tests/dumps"]
    DEBUG : Creating backend with remote "r2-bucket:dumps"
    DEBUG : Using config file from "/<user-name>/.config/rclone/rclone.conf"
    DEBUG : Resolving service "s3" region "us-east-1"
    DEBUG : Creating backend with remote "./tests/dumps"
    DEBUG : fs cache: renaming cache item "./tests/dumps" to be canonical "<path>"
    DEBUG : Local file system at <local-path>/dumps: Waiting for checks to finish
    DEBUG : Local file system at <local-path>/dumps: Waiting for transfers to finish
    DEBUG : Waiting for deletions to finish
    INFO  : There was nothing to transfer
    INFO  : 
    Transferred:              0 B / 0 B, -, 0 B/s, ETA -
    Elapsed time:         0.2s
    But I can confirm there are files in R2 interface, and the local spaces dumps/ are emptied.
  • t

    tt2468

    05/23/2023, 7:28 AM
    I was trying to sync a simple flat directory of files to a single bucket
  • k

    Karew

    05/23/2023, 7:29 AM
    Ok, you need to do
    r2-instance-debs:instance-debs
    in that case. If you only write
    r2-instance-debs:
    you are addressing the root of your R2 account, the folders after the
    :
    are bucket names, so rclone is trying to create a bunch of buckets on your account.
  • h

    hansw

    05/23/2023, 7:30 AM
    Also
    Copy code
    rclone tree -vv r2-bucket:
    rclone: Version "v1.62.2" starting with parameters ["rclone" "tree" "-vv" "r2-bucket:"]
    Creating backend with remote "r2-bucket:"
    DEBUG : Using config file from "<config>"
    DEBUG : Resolving service "s3" region "us-east-1"
    DEBUG : Stat: filePath="/"
    DEBUG : >Stat: fi=, err=<nil>
    DEBUG : ReadDir: dir=/
    DEBUG : >ReadDir: names=[], err=<nil>
    /
    
    0 directories, 0 files
    Which is showing 0 directories and 0 files 😦
  • t

    tt2468

    05/23/2023, 7:30 AM
    If my bucket is
    my-bucket
    , the s3 url that the dashboard gives you has the
    /my-bucket
    postfix. The docs do not mention that you need to remove this postfix in order for rclone to work correctly without creating a sub folder
  • k

    Karew

    05/23/2023, 7:32 AM

    https://s.karew.wtf/z1PCBhUWve.png▾

  • k

    Karew

    05/23/2023, 7:33 AM
    The dashboard value is not helpful, I agree. But I guess they're assuming you're using the API directly or something instead of rclone.
  • f

    frydim1

    05/23/2023, 7:59 AM
    Is there a way to test latency between the different r2 regions ?
  • f

    frydim1

    05/23/2023, 8:20 AM
    this doesn't work if there are pending uploads, and i haven't found a way to make it work with pending uploads newer than 24 hours
  • k

    Karew

    05/23/2023, 8:21 AM
    Try running
    rclone cleanup
    on the bucket before
    purge
1...103910401041...1050Latest