使用 rclone 支持的云存储提供商与 git-annex 结合使用
Users are urged to upgrade to version 0.4 or higher immediately. Some ways of using earlier versions could result in data loss. more information here This wrapper around rclone makes any destination supported by rclone usable with git-annex.
Cloud storage providers supported by rclone currently include:
/usr/local/bingit-annex-remote-rclone into your $PATHBecause rclone sometimes changes its output, updates to this software may be required for compatibility. Version 1.45 of rclone introduces a more stable JSON output mode on some commands and for that reason is the minimum supported version.
A periodic continuous integration process tests compatibility against
the latest stable release of git-annex and the following versions of rclone:
The build badge above is linked to this CI process.
rclone config. rclone configuration is password-protected then export the RCLONE_CONFIG_PASS environment variable in the shell where you will execute git annex command:export RCLONE_CONFIG_PASS=your_password_hereor prefix `git annex` command with the environment variable:RCLONE_CONFIG_PASS=your_password_here git annex ...or
rclone_passcmd can be used to pass command to fetch passwrod
Pull requests proposing a more secure or easier to use approach to password-protected rclone configurations are welcome.
Create a git-annex repository (walkthrough)
Choose a repository layout. If you are having difficulty choosing, the lower layout is recommended. Supported layouts:
lower - A two-level lower case directory hierarchy is used (using git-annex's DIRHASH-LOWER MD5-based format). This choice requires git-annex 6.20160511 or later.directory - A two-level lower case directory hierarchy is used, along with the key name as a 3rd level nested directory. This choice requires git-annex 6.20160511 or later.
nodir - No directory hierarchy is used.default is used.mixed - A two-level mixed case directory hierarchy is used (using git-annex's DIRHASH format).default swift container is chosen.frankencase - A two-level lower case directory hierarchy is used (using git-annex's DIRHASH format, with all characters translated to lower case)Add a remote for the provider. This example:
myacdremoteacdlower repository layoutgit-annex:git annex initremote myacdremote type=external externaltype=rclone target=acd prefix=git-annex chunk=50MiB encryption=shared mac=HMACSHA512 rclone_layout=lowerelse with rclone_passcmd pass password command which internally use rclone --password-command option
git annex initremote myacdremote type=external externaltype=rclone target=acd prefix=git-annex chunk=50MiB encryption=shared mac=HMACSHA512 rclone_layout=lower \
rclone_passcmd="secret-tool lookup rclone gcrypt"or when enabling an existing remote:
git annex initremote myacdremote rclone_passcmd="secret-tool lookup rclone gcrypt"The initremote command calls out to GPG and can hang if a machine has insufficient entropy. To debug issues, use the --debug flag, i.e. git-annex initremote --debug.
Choose your chunk size based on your needs. By using a chunk size below the maximum file size supported by your cloud storage provider for uploads and downloads, you won't need to worry about running into issues with file size. Smaller chunk sizes: leak less information about the size of file size of files in your repository, require less ram, and require less data to be re-transmitted when network connectivity is interrupted. Larger chunks require less round trips to and from your cloud provider and may be faster. Additional discussion about chunk size can be found here and here
git-annex-remote-rclone now requires specifying a rclone_layout= setting. Earlier versions used the frankencase layout,
which is no longer recommended.
A migration script is included which will convert your data from the frankencase layout to the lower layout.
Avoid using the remote during migration. The migration script is idempotent. It is safe to re-run it if migration is interrupted or if some move operations do not complete successfully. When running the script no longer generates any 'move' commands, all objects have been migrated to the new layout.
At this time, this remote does NOT store your credentials in git-annex. Users are responsible for ensuring a ~/.rclone.conf file with valid credentials is available.
Not all of the supported cloud storage providers have been tested. While in theory any provider that works with rclone should also work with this remote, it's possible there are unforeseen integration issues - issues which might even result in data loss.
If you run into any problems, please check for issues on GitHub. Please submit a pull request or create a new issue for problems or potential improvements.
Copyright 2016-2022 Daniel Dent, 2022 git-annex-remote-rclone contributors. Licensed under the GPLv3.
暂无开放 Issues,或尚未同步最近议题。