[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.4.1

No permission to download
Migration of attachments and avatars to R2

R2 allows you to offload the storage (for files in the data directory [like avatars], you can also offload the bandwidth for serving the content). For those with CLI access to their servers, this addon includes a CLI tool to assist migrating existing data to R2. You can get info about it by running this command on your server:

Bash:
php cmd.php dp:migrate-data --help

One notable option is --processes=PROCESSES, which allows it to migrate multiple files in parallel. Consider how much available server resources you have when using this. If your server's CPUs are overloaded as it is, keep it low. If you have tons of unused bandwidth available and plenty of CPU cycles, you could set it to the number of CPU cores your server has. While every server and available resources are different, a test using 32 concurrent processes was able to move 500MB worth of attachments per minute with the CLI command (see this post).

rclone

While the CLI command works fairly well, it does work within the limitations of XenForo and the Flysystem abstracted filesystem XenForo uses. If you want to move a massive amount of files, you should consider something like the free rclone tool (create a separate Cloudflare API token just for rclone or whatever other third-party utility you may use).

You need to define a remote provider config (in the example below, it's called remoteR2 with the rclone config create command). The options might be different for you, but you can move files with a command along the lines of:

Bash:
/usr/bin/rclone sync /path/to/files/you/want/to/move remoteR2:bucket/ --verbose --transfers 10

If you are migrating data manually, make sure the file structure of your R2 buckets match up to what's expected (see this post).
Back
Top Bottom