I am trying to write a database backup file (using pg_basebackup
) directly to a rclone mounted Google drive remote foo-db-dumps
, but kept getting this error whenever I start the backup program:
could not identify current directory: Transport endpoint is not connected
The following is what I did to get the error:
Step 1. Mounting the Google Drive Remote using rclone mount
rclone mount --vfs-cache-mode writes -vv gdrive_foo_db:/foo-db-dumps /mnt/foo-db-dumps
with the following log messages:
2020/02/16 13:52:04 DEBUG : rclone: Version "v1.50.2" starting with parameters ["rclone" "mount" "--vfs-cache-mode" "writes" "-vv" "gdrive_foo_db:/foo-db-dumps" "/mnt/foo-db-dumps"]
2020/02/16 13:52:04 DEBUG : Using config file from "/home/nyxynyx/.config/rclone/rclone.conf"
2020/02/16 13:52:05 DEBUG : Google drive root 'foo-db-dumps': Mounting on "/mnt/foo-db-dumps"
2020/02/16 13:52:05 DEBUG : vfs cache root is "/home/nyxynyx/.cache/rclone/vfs/gdrive_foo_db/foo-db-dumps"
2020/02/16 13:52:05 DEBUG : Adding path "vfs/forget" to remote control registry
2020/02/16 13:52:05 DEBUG : Adding path "vfs/refresh" to remote control registry
2020/02/16 13:52:05 DEBUG : Adding path "vfs/poll-interval" to remote control registry
2020/02/16 13:52:05 DEBUG : base.tar: updateTime: setting atime to 2020-02-16 13:51:41.447323921 -0500 EST
2020/02/16 13:52:05 DEBUG : : Root:
2020/02/16 13:52:05 DEBUG : : >Root: node=/, err=<nil>
2020/02/16 13:52:05 INFO : Cleaned the cache: objects 2 (was 0), total size 6.559G (was 0)
Step 2. Start the program that writes the backup files to Gdrive Remote
pg_basebackup --dbname=postgres://postgres:foopass@localhost:5432 --format=tar -X fetch -D /mnt/foo-db-dumps
This is where the error message occurs immediately after running the pg_basebackup
command
could not identify current directory: Transport endpoint is not connected
This also resulted in the following log messages from rclone mount
:
2020/02/16 13:52:13 DEBUG : /: Attr:
2020/02/16 13:52:13 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2020/02/16 13:52:13 DEBUG : /: ReadDirAll:
2020/02/16 13:52:13 DEBUG : /: >ReadDirAll: item=0, err=<nil>
2020/02/16 13:52:20 DEBUG : /: Attr:
2020/02/16 13:52:20 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2020/02/16 13:52:20 DEBUG : /: ReadDirAll:
2020/02/16 13:52:20 DEBUG : /: >ReadDirAll: item=0, err=<nil>
2020/02/16 13:53:05 DEBUG : Google drive root 'foo-db-dumps': Checking for changes on remote
2020/02/16 13:53:05 INFO : Cleaned the cache: objects 2 (was 2), total size 6.559G (was 6.559G)
followed by a lot of log messages such as:
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: Write: len=4096, offset=13624373248
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: >Write: written=4096, err=<nil>
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: Write: len=28672, offset=13624377344
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: >Write: written=28672, err=<nil>
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: Write: len=4096, offset=13624406016
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: >Write: written=4096, err=<nil>
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: Write: len=28672, offset=13624410112
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: >Write: written=28672, err=<nil>
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: Write: len=4096, offset=13624438784
2020/02/16 14:03:57 DEBUG : &{base.tar (rw)}: >Write: written=4096, err=<ni
Question: Is this an error that needs to be fixed?
Using
- rclone v1.50.2
- os/arch: linux/amd64
- go version: go1.13.4
- Ubuntu 18.04.3