github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/combine.md (about) 1 --- 2 title: "Combine" 3 description: "Combine several remotes into one" 4 versionIntroduced: "v1.59" 5 --- 6 7 # {{< icon "fa fa-folder-plus" >}} Combine 8 9 The `combine` backend joins remotes together into a single directory 10 tree. 11 12 For example you might have a remote for images on one provider: 13 14 ``` 15 $ rclone tree s3:imagesbucket 16 / 17 ├── image1.jpg 18 └── image2.jpg 19 ``` 20 21 And a remote for files on another: 22 23 ``` 24 $ rclone tree drive:important/files 25 / 26 ├── file1.txt 27 └── file2.txt 28 ``` 29 30 The `combine` backend can join these together into a synthetic 31 directory structure like this: 32 33 ``` 34 $ rclone tree combined: 35 / 36 ├── files 37 │ ├── file1.txt 38 │ └── file2.txt 39 └── images 40 ├── image1.jpg 41 └── image2.jpg 42 ``` 43 44 You'd do this by specifying an `upstreams` parameter in the config 45 like this 46 47 upstreams = images=s3:imagesbucket files=drive:important/files 48 49 During the initial setup with `rclone config` you will specify the 50 upstreams remotes as a space separated list. The upstream remotes can 51 either be a local paths or other remotes. 52 53 ## Configuration 54 55 Here is an example of how to make a combine called `remote` for the 56 example above. First run: 57 58 rclone config 59 60 This will guide you through an interactive setup process: 61 62 ``` 63 No remotes found, make a new one? 64 n) New remote 65 s) Set configuration password 66 q) Quit config 67 n/s/q> n 68 name> remote 69 Option Storage. 70 Type of storage to configure. 71 Choose a number from below, or type in your own value. 72 ... 73 XX / Combine several remotes into one 74 \ (combine) 75 ... 76 Storage> combine 77 Option upstreams. 78 Upstreams for combining 79 These should be in the form 80 dir=remote:path dir2=remote2:path 81 Where before the = is specified the root directory and after is the remote to 82 put there. 83 Embedded spaces can be added using quotes 84 "dir=remote:path with space" "dir2=remote2:path with space" 85 Enter a fs.SpaceSepList value. 86 upstreams> images=s3:imagesbucket files=drive:important/files 87 -------------------- 88 [remote] 89 type = combine 90 upstreams = images=s3:imagesbucket files=drive:important/files 91 -------------------- 92 y) Yes this is OK (default) 93 e) Edit this remote 94 d) Delete this remote 95 y/e/d> y 96 ``` 97 98 ### Configuring for Google Drive Shared Drives 99 100 Rclone has a convenience feature for making a combine backend for all 101 the shared drives you have access to. 102 103 Assuming your main (non shared drive) Google drive remote is called 104 `drive:` you would run 105 106 rclone backend -o config drives drive: 107 108 This would produce something like this: 109 110 [My Drive] 111 type = alias 112 remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=: 113 114 [Test Drive] 115 type = alias 116 remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=: 117 118 [AllDrives] 119 type = combine 120 upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:" 121 122 If you then add that config to your config file (find it with `rclone 123 config file`) then you can access all the shared drives in one place 124 with the `AllDrives:` remote. 125 126 See [the Google Drive docs](/drive/#drives) for full info. 127 128 {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/combine/combine.go then run make backenddocs" >}} 129 ### Standard options 130 131 Here are the Standard options specific to combine (Combine several remotes into one). 132 133 #### --combine-upstreams 134 135 Upstreams for combining 136 137 These should be in the form 138 139 dir=remote:path dir2=remote2:path 140 141 Where before the = is specified the root directory and after is the remote to 142 put there. 143 144 Embedded spaces can be added using quotes 145 146 "dir=remote:path with space" "dir2=remote2:path with space" 147 148 149 150 Properties: 151 152 - Config: upstreams 153 - Env Var: RCLONE_COMBINE_UPSTREAMS 154 - Type: SpaceSepList 155 - Default: 156 157 ### Advanced options 158 159 Here are the Advanced options specific to combine (Combine several remotes into one). 160 161 #### --combine-description 162 163 Description of the remote 164 165 Properties: 166 167 - Config: description 168 - Env Var: RCLONE_COMBINE_DESCRIPTION 169 - Type: string 170 - Required: false 171 172 ### Metadata 173 174 Any metadata supported by the underlying remote is read and written. 175 176 See the [metadata](/docs/#metadata) docs for more info. 177 178 {{< rem autogenerated options stop >}}