What is the problem you are having with rclone?
When I am transferring the drive contents to AWS S3, the copy command is not able to transfer the empty directories. I have tried the --create-empty-src-dirs flag, but it doesn't work to create directories on S3 where reason said was that S3 doesn't support empty directories. I tried using put_object method which properly uploads an empty folder as a file of 0bytes. Is there any way to do this as some flag in rclone?
Run the command 'rclone version' and share the full output of the command.
Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> * os/version: ubuntu 22.04 (64 bit)
os/kernel: 5.19.0-1022-aws (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.20.2
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Downloading the files from Google drive and uploading it to AWS S3.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone -P copy remote_g:opFolder_new --drive-chunk-size 32M remote_s3:drive2cloudbackup/hello2 --create-empty-src-dirs
The rclone config contents with secrets removed.
Current remotes:
Name Type
==== ====
remote_g drive
remote_s3 s3
asdffdsa
(jojothehumanmonkey)
April 24, 2023, 4:13pm
2
rclone does not support empty directories on S3.
often requested feature and much discussed in the forum.
https://forum.rclone.org/t/how-to-rclone-copy-empty-folders-directories/14081
https://github.com/rclone/rclone/issues/4423
is this a one time transfer or something to be done on a schedule?
you could write a script that:
for each empty dirs on gdrive, copy a file to it.
rclone copy
delete those files from aws
I think you missed the description. Let me reiterate this for you. I had written a script that can upload an empty folder as a 0-byte object using put_object(Bucket=bucket_name, Key=key)
. The attached screenshot shows two empty folders which were transferred from google drive to AWS S3 here as 0B objects. This whole thing is getting executed without even the need of copying a test file and then delete it.
Now, my query is if this feature has been programmed into rclone copy command or, if was it missed.
asdffdsa
(jojothehumanmonkey)
April 25, 2023, 7:13pm
4
yes, that is possible using script. rclone cannot create an empty dir on s3.
https://forum.rclone.org/t/create-empty-directories/32297
/usr/bin/rclone copy testDrive: s3-rclone:/blah.blah.com/ --create-empty-src-dirs
That is the command I am trying to run.
From GSuite/Shared Drive to S3 bucket. I copy the shared drive with empty folders but do not see the folders in s3 once rclone copy is executed.
Let me know if my command is correct or if this is even possible
Edit:
rclone v1.50.2
os/arch: linux/amd64
go version: go1.13.4
opened 09:19AM - 09 Jul 20 UTC
closed 09:09PM - 24 Jul 20 UTC
question
Remote: S3
#### What is the problem you are having with rclone?
The option --create-empty-… src-dirs doesn't seem to be working for S3 storage.
It keeps saying it creates the directory but it doesn't. I tried it with Oracle OCI and with AWS S3. Both the same issue
#### What is your rclone version (output from `rclone version`)
rclone v1.52.2
- os/arch: windows/amd64
- go version: go1.14.4
#### Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 10, 64 bit
#### Which cloud storage system are you using? (eg Google Drive)
Other S3
AWS S3
#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)
Configuration file
```
[OCI]
type = s3
provider = Other
env_auth = false
access_key_id = <not public>
secret_access_key = <not public>
endpoint = <not public>
acl = authenticated-read
[AWS]
type = s3
provider = AWS
env_auth = false
access_key_id = <not public>
secret_access_key = <not public>
region = <not public>
acl = authenticated-read
```
Folder structure
```
Directory of C:\log
09-07-2020 10:09 <DIR> .
09-07-2020 10:09 <DIR> ..
08-07-2020 13:49 892.232 applicatie.exe
09-07-2020 09:45 0 document1.txt
09-07-2020 10:56 <DIR> folder1
09-07-2020 09:58 <DIR> folder2 <-- empty
09-07-2020 10:01 <DIR> folder3 <-- empty
07-07-2020 10:41 18.637.976 pdf1.pdf
3 File(s) 19.530.208 bytes
5 Dir(s) 47.271.096.320 bytes free
```
command:
```
rclone sync "C:\log" OCI:test_RCLONE --progress --create-empty-src-dirs
```
#### A log from the command with the `-vv` flag (eg output from `rclone -vv copy /tmp remote:tmp`)
AWS shows the same issue
example
```
C:\log>rclone -vv sync "C:\log" OCI:test_RCLONE --progress --create-empty-src-dirs
2020/07/09 11:15:24 DEBUG : rclone: Version "v1.52.2" starting with parameters ["rclone" "-vv" "sync" "C:\\log" "OCI:test_RCLONE" "--progress" "--create-empty-src-dirs"]
2020/07/09 11:15:24 DEBUG : Using config file from "C:\\rclone\\pmunne_rclone.conf"
2020/07/09 11:15:24 DEBUG : fs cache: renaming cache item "C:\\log" to be canonical "//?/C:/log"
2020-07-09 11:15:24 DEBUG : applicatie.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : applicatie.exe: Unchanged skipping
2020-07-09 11:15:24 DEBUG : document1.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : pdf1.pdf: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : pdf1.pdf: Unchanged skipping
2020-07-09 11:15:24 DEBUG : folder1/New Text Document.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : document1.txt: Unchanged skipping
2020-07-09 11:15:24 DEBUG : S3 bucket test_RCLONE: Waiting for checks to finish
2020-07-09 11:15:24 DEBUG : folder1/AWS/applicatie.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : folder1/AWS/pdf1.pdf: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : folder1/AWS/document1.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : folder1/AWS/folder1/New Text Document.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:15:24 DEBUG : folder1/New Text Document.txt: Unchanged skipping
2020-07-09 11:15:24 DEBUG : folder1/AWS/applicatie.exe: Unchanged skipping
2020-07-09 11:15:24 DEBUG : folder1/AWS/pdf1.pdf: Unchanged skipping
2020-07-09 11:15:24 DEBUG : folder1/AWS/document1.txt: Unchanged skipping
2020-07-09 11:15:24 DEBUG : folder1/AWS/folder1/New Text Document.txt: Unchanged skipping
2020-07-09 11:15:25 DEBUG : S3 bucket test_RCLONE: Waiting for transfers to finish
2020-07-09 11:15:25 DEBUG : folder1/AWS/folder1/folder1_1: Making directory
2020-07-09 11:15:25 DEBUG : folder2: Making directory
2020-07-09 11:15:25 DEBUG : folder3: Making directory
2020-07-09 11:15:25 DEBUG : folder1/folder1_1: Making directory
2020-07-09 11:15:25 DEBUG : folder1/AWS/folder2: Making directory
2020-07-09 11:15:25 DEBUG : folder1/AWS/folder3: Making directory
2020-07-09 11:15:25 DEBUG : S3 bucket test_RCLONE: copied 6 directories
2020-07-09 11:15:25 DEBUG : Waiting for deletions to finish
2020-07-09 11:15:25 INFO : There was nothing to transfer
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 8 / 8, 100%
Elapsed time: 0.5s
2020/07/09 11:15:25 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 8 / 8, 100%
Elapsed time: 0.5s
2020/07/09 11:15:25 DEBUG : 14 go routines active
C:\log>
```
You see it is making folder2 and folder3, but it hasn't really
if you run it again. Same try for the folders
```
C:\log>rclone -vv sync "C:\log" OCI:test_RCLONE --progress --create-empty-src-dirs
2020/07/09 11:16:30 DEBUG : rclone: Version "v1.52.2" starting with parameters ["rclone" "-vv" "sync" "C:\\log" "OCI:test_RCLONE" "--progress" "--create-empty-src-dirs"]
2020/07/09 11:16:30 DEBUG : Using config file from "C:\\rclone\\pmunne_rclone.conf"
2020/07/09 11:16:30 DEBUG : fs cache: renaming cache item "C:\\log" to be canonical "//?/C:/log"
2020-07-09 11:16:30 DEBUG : applicatie.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : applicatie.exe: Unchanged skipping
2020-07-09 11:16:30 DEBUG : document1.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : document1.txt: Unchanged skipping
2020-07-09 11:16:30 DEBUG : pdf1.pdf: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : pdf1.pdf: Unchanged skipping
2020-07-09 11:16:30 DEBUG : folder1/New Text Document.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : folder1/AWS/applicatie.exe: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : S3 bucket test_RCLONE: Waiting for checks to finish
2020-07-09 11:16:30 DEBUG : folder1/AWS/pdf1.pdf: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : folder1/AWS/document1.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : folder1/New Text Document.txt: Unchanged skipping
2020-07-09 11:16:30 DEBUG : folder1/AWS/folder1/New Text Document.txt: Size and modification time the same (differ by 0s, within tolerance 100ns)
2020-07-09 11:16:30 DEBUG : folder1/AWS/applicatie.exe: Unchanged skipping
2020-07-09 11:16:31 DEBUG : folder1/AWS/pdf1.pdf: Unchanged skipping
2020-07-09 11:16:31 DEBUG : folder1/AWS/document1.txt: Unchanged skipping
2020-07-09 11:16:31 DEBUG : folder1/AWS/folder1/New Text Document.txt: Unchanged skipping
2020-07-09 11:16:31 DEBUG : S3 bucket test_RCLONE: Waiting for transfers to finish
2020-07-09 11:16:31 DEBUG : folder2: Making directory
2020-07-09 11:16:31 DEBUG : folder3: Making directory
2020-07-09 11:16:31 DEBUG : folder1/folder1_1: Making directory
2020-07-09 11:16:31 DEBUG : folder1/AWS/folder2: Making directory
2020-07-09 11:16:31 DEBUG : folder1/AWS/folder3: Making directory
2020-07-09 11:16:31 DEBUG : folder1/AWS/folder1/folder1_1: Making directory
2020-07-09 11:16:31 DEBUG : S3 bucket test_RCLONE: copied 6 directories
2020-07-09 11:16:31 DEBUG : Waiting for deletions to finish
2020-07-09 11:16:31 INFO : There was nothing to transfer
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 8 / 8, 100%
Elapsed time: 0.5s
2020/07/09 11:16:31 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 8 / 8, 100%
Elapsed time: 0.5s
2020/07/09 11:16:31 DEBUG : 14 go routines active
C:\log>
```
rclone backend features aws:
{
"Name": "aws",
"Root": "",
"String": "S3 root",
"Precision": 1,
"Hashes": [
"md5"
],
"Features": {
"About": false,
"BucketBased": true,
"BucketBasedRootOK": true,
"CanHaveEmptyDirectories": false,
asdffdsa
(jojothehumanmonkey)
April 25, 2023, 11:25pm
5
maybe i am confused. what i see is one folder.
and two objects/files of size zero bytes and storage class as standard.
system
(system)
Closed
May 25, 2023, 11:26pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.