Attempt failed: is not a regular file

What is the problem you are having with rclone?

I'm trying to back up my Shell scripts from my Linux machine, and I have installed RCLONE and have managed to back up some of my files just fine. But I then created a new script and tried to upload the folder to the cloud again, so everything was synced.

I did look up what a regular file is and I saw that test -f <file>; echo $? should return a 0 if the file is regular and if I run that on sys_check.sh, I do get a 0, so I'm not sure why it's saying the file isn't regular.

What is your rclone version (output from rclone version)

1.53.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Raspberry Pi OS (32-bit)

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy "/home/pi/Scripts/sysinfo/sys_check.sh" "GSuite:Raspberry Pi/Scripts/sysinfo"

A log from the command with the -vv flag

2021/01/21 18:53:24 ERROR : Attempt 1/3 failed with 1 errors and: is not a regular file
    2021/01/21 18:53:24 ERROR : Attempt 2/3 failed with 1 errors and: is not a regular file
    2021/01/21 18:53:25 ERROR : Attempt 3/3 failed with 1 errors and: is not a regular file
    2021/01/21 18:53:25 Failed to copy: is not a regular file

Can you:

ls -al /home/pi/Scripts/sysinfo/sys_check.sh
file /home/pi/Scripts/sysinfo/sys_check.sh
pi@raspberrypi:~ $ ls -al /home/pi/Scripts/sysinfo/sys_check.sh
-rwxr-xr-x 1 pi pi 439 Jan 21 21:17 /home/pi/Scripts/sysinfo/sys_check.sh
pi@raspberrypi:~ $ file /home/pi/Scripts/sysinfo/sys_check.sh
/home/pi/Scripts/sysinfo/sys_check.sh: Bourne-Again shell script, ASCII text executable

This is the output of those commands

Can you run the copy command share the full output with -vv ?

I already put the output of the -vv flag in my original post.

In the first post, the full debug log isn't there.

It should look like:

felix@gemini:~$ rclone lsf GD: -vv
2021/01/22 12:43:22 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "lsf" "GD:" "-vv"]
2021/01/22 12:43:22 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/01/22 12:43:22 DEBUG : Creating backend with remote "GD:"
backups/
crypt/
test/
2021/01/22 12:43:23 DEBUG : 4 go routines active
rclone -vv copy "/home/pi/Scripts/sysinfo/sys_check.sh" "GSuite:Raspberry Pi/Scripts/sysinfo"
2021/01/22 17:57:00 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "-vv" 
"copy" "/home/pi/Scripts/sysinfo/sys_check.sh" "GSuite:Raspberry Pi/Scripts/sysinfo"]
2021/01/22 17:57:00 DEBUG : Creating backend with remote "/ home/pi/Scripts/sysinfo/sys_check.sh"
2021/01/22 17:57:00 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2021/01/22 17:57:00 DEBUG : fs cache: adding new entry for parent of 
"/home/pi/Scripts/sysinfo/sys_check.sh", "/home/pi/Scripts/sysinfo"
2021/01/22 17:57:00 DEBUG : Creating backend with remote "GSuite:Raspberry Pi/Scripts/sysinfo"
2021/01/22 17:57:00 DEBUG : GSuite: Loaded invalid token from config file - ignoring
2021/01/22 17:57:00 DEBUG : Keeping previous permissions for config file: -rw-r--r--
2021/01/22 17:57:00 DEBUG : GSuite: Saved new token in config file
2021/01/22 17:57:02 ERROR : Attempt 1/3 failed with 1 errors and: is not a regular file
2021/01/22 17:57:02 ERROR : Attempt 2/3 failed with 1 errors and: is not a regular file
2021/01/22 17:57:03 ERROR : Attempt 3/3 failed with 1 errors and: is not a regular file    
2021/01/22 17:57:03 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         2.4s

2021/01/22 17:57:03 DEBUG : 6 go routines active
2021/01/22 17:57:03 Failed to copy: is not a regular file

Is that a paste error or is there a space between

/ home

?

And you can rclone ls the file?

rclone ls  "/home/pi/Scripts/sysinfo/sys_check.sh" -vv

I think the space might be a paste error from when I was formatting it into the code block. And here's the output for that command:

pi@raspberrypi:~ $ rclone ls  "/home/pi/Scripts/sysinfo/sys_check.sh" -vv
2021/01/22 18:20:23 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "ls" "/home/pi/Scripts/sysinfo/sys_check.sh" "-vv"]
2021/01/22 18:20:23 DEBUG : Creating backend with remote "/home/pi/Scripts/sysinfo/sys_check.sh"
2021/01/22 18:20:23 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2021/01/22 18:20:23 DEBUG : fs cache: adding new entry for parent of "/home/pi/Scripts/sysinfo/sys_check.sh", "/home/pi/Scripts/sysinfo"
2021/01/22 18:20:23 DEBUG : temp_test.sh: Excluded
2021/01/22 18:20:23 DEBUG : get_versions.sh: Excluded
      439 sys_check.sh
2021/01/22 18:20:23 DEBUG : 2 go routines active

Can you share the output of rclone version?

felix@gemini:~/test$ rclone version
rclone v1.53.3
- os/arch: linux/amd64
- go version: go1.15.5
pi@raspberrypi:~ $ rclone --version
rclone v1.53.3
- os/arch: linux/arm
- go version: go1.15.5

and let's rule out the destination side as I slowly get out of ideas as I want to see if this works:

rclone copy "/home/pi/Scripts/sysinfo/sys_check.sh" "/home/pi/Scripts/sysinfo/sys_check.sh-test"

You can call it whatever you want. I think it's something very specific the OS and that would keep the focus on that.

If I run that command, I get no output. It runs, then goes back to the prompt in the terminal

Right so you'd see the new file, correct? It'll copy to a directory so you can use whatever path you want:

felix@flux:~$ rclone copy /etc/hosts /home/felix/testme
felix@flux:~$ ls -al testme
total 12
drwxr-xr-x 2 felix felix 4096 Jan 22 14:17 .
drwxr-xr-x 9 felix felix 4096 Jan 22 14:17 ..
-rw-r--r-- 1 felix felix  405 Jan 20 10:29 hosts

This is what I see:

pi@raspberrypi:~ $ ls -al /home/pi/Scripts/sysinfo/
total 24
drwxr-xr-x 3 pi pi 4096 Jan 22 19:13 .
drwxr-xr-x 5 pi pi 4096 Jan 21 22:51 ..
-rwxr-xr-x 1 pi pi  110 Jan 21 22:37 get_versions.sh
-rwxr-xr-x 1 pi pi  439 Jan 21 21:17 sys_check.sh
drwxr-xr-x 2 pi pi 4096 Jan 22 19:13 sys_check.sh-test
-rwxr-xr-x 1 pi pi  170 Jan 21 22:38 temp_test.sh

and the same file is in that directory as well? That would mean the copy worked.

pi@raspberrypi:~ $ ls -al /home/pi/Scripts/sysinfo/sys_check.sh-test/
total 12
drwxr-xr-x 2 pi pi 4096 Jan 22 19:13 .
drwxr-xr-x 3 pi pi 4096 Jan 22 19:13 ..
-rw-r--r-- 1 pi pi  439 Jan 21 21:17 sys_check.sh

Just for fun, what happens if you copy it to the root of your GD?

rclone -vv copy "/home/pi/Scripts/sysinfo/sys_check.sh" GSuite:
pi@raspberrypi:~ $ rclone -vv copy "/home/pi/Scripts/sysinfo/sys_check.sh" GSuite:
2021/01/22 19:28:25 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "-vv" "copy" "/home/pi/Scripts/sysinfo/sys_check.sh" "GSuite:"]
2021/01/22 19:28:25 DEBUG : Creating backend with remote "/home/pi/Scripts/sysinfo/sys_check.sh"
2021/01/22 19:28:25 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2021/01/22 19:28:25 DEBUG : fs cache: adding new entry for parent of "/home/pi/Scripts/sysinfo/sys_check.sh", "/home/pi/Scripts/sysinfo"
2021/01/22 19:28:25 DEBUG : Creating backend with remote "GSuite:"
2021/01/22 19:28:26 DEBUG : sys_check.sh: Need to transfer - File not found at Destination
2021/01/22 19:28:27 DEBUG : sys_check.sh: MD5 = 35580db79e804466af7091e3a111f5b8 OK
2021/01/22 19:28:27 INFO  : sys_check.sh: Copied (new)
2021/01/22 19:28:27 INFO  : 
Transferred:   	       439 / 439 Bytes, 100%, 272 Bytes/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         2.0s

2021/01/22 19:28:27 DEBUG : 4 go routines active