dogbutcat / gclone

fork from https://github.com/donwa/gclone
166 stars 28 forks source link

I think the --drive-random-pick-sa flag is not working #11

Closed fidodone closed 2 years ago

fidodone commented 2 years ago

I did some tests using the --drive-random-pick-sa flag and even with the flag set glcone is rotating service accounts sequentially

in my test I used 10 SAs

command: gclone copy ~/test drive:test3 -Pv --drive-rolling-sa --drive-rolling-count=1 --drive-random-pick-sa


2022-06-20 15:02:15 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/02.json
2022-06-20 15:02:17 INFO  : 38.txt: Copied (new)
2022-06-20 15:02:17 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/03.json
2022-06-20 15:02:19 INFO  : 39.txt: Copied (new)
2022-06-20 15:02:19 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/04.json
2022-06-20 15:02:21 INFO  : 4.txt: Copied (new)
2022-06-20 15:02:21 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/05.json
2022-06-20 15:02:23 INFO  : 40.txt: Copied (new)
2022-06-20 15:02:23 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/06.json
2022-06-20 15:02:24 INFO  : 41.txt: Copied (new)
2022-06-20 15:02:24 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/07.json
2022-06-20 15:02:26 INFO  : 42.txt: Copied (new)
2022-06-20 15:02:26 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/08.json
2022-06-20 15:02:28 INFO  : 43.txt: Copied (new)
2022-06-20 15:02:28 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/09.json
2022-06-20 15:02:29 INFO  : 44.txt: Copied (new)
2022-06-20 15:02:29 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/10.json
2022-06-20 15:02:31 INFO  : 45.txt: Copied (new)
2022-06-20 15:02:31 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/01.json
2022-06-20 15:02:33 INFO  : 46.txt: Copied (new)
2022-06-20 15:02:33 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/02.json
2022-06-20 15:02:35 INFO  : 47.txt: Copied (new)
2022-06-20 15:02:35 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/03.json
2022-06-20 15:02:36 INFO  : 48.txt: Copied (new)
2022-06-20 15:02:36 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/04.json
2022-06-20 15:02:38 INFO  : 49.txt: Copied (new)
2022-06-20 15:02:38 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/05.json
2022-06-20 15:02:40 INFO  : 5.txt: Copied (new)
2022-06-20 15:02:40 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/06.json
2022-06-20 15:02:42 INFO  : 50.txt: Copied (new)
2022-06-20 15:02:42 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/07.json
2022-06-20 15:02:44 INFO  : 6.txt: Copied (new)
2022-06-20 15:02:44 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/08.json
2022-06-20 15:02:45 INFO  : 7.txt: Copied (new)
2022-06-20 15:02:45 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/09.json
2022-06-20 15:02:47 INFO  : 8.txt: Copied (new)
2022-06-20 15:02:47 INFO  : rolling gclone sa file: /home/luiz/.config/rclone/10.json
2022-06-20 15:02:49 INFO  : 9.txt: Copied (new)
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Checks:                31 / 31, 100%
Transferred:           19 / 19, 100%
Elapsed time:        34.3s
2022/06/20 15:02:49 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Checks:                31 / 31, 100%
Transferred:           19 / 19, 100%
Elapsed time:        34.3s
dogbutcat commented 2 years ago

--drive-random-pick-sa is for random pick initial sa file set in rclone.conf like below

[local]
type = drive
scope = drive
service_account_file = [SA_FILE_PATH] <--- random pick initial one
service_account_file_path = [SA_FOLDER]
root_folder_id = 
team_drive = [TEAM_DRIVE_ID]

Why not ramdon pick in rolling?

In short rolling is more than balance use of SAs also for balance of sa projects