Hi everyone,
I have a bash script install on my Cent OS 6 to auto backup my website and upload into GG drive
Here is full : http://pastebin.com/u3grLZqD
My remote connection to GG drive is remote
According to this script, it will create and upload a backup folder $SERVER_NAME/$TIMESTAMP to GG drive and auto delete backup older than 2weeks
Folder on GG drive will be like that:
SERVER_NAME/2017-01-12
SERVER_NAME/2017-01-13
SERVER_NAME/2017-01-14
But, it just delete content inside, not delete folder (folder become empty, have to delete manually)
This line for deleting:
rcloneās folder handling is still a bit erratic - see https://github.com/ncw/rclone/issues/100 - that is why the empty folders arenāt being removed. purge does remove the directories though.
Use delete and rmdir but it doesntā help because each directory have sub folder inside (although sub folder is empty)
Itās : My Drive > HOCVPS_BACKUP > YYYY-MM-DD > mysql (or nginx)
Level 1: HOCVPS_BACKUP
Level 2: Folder backup for each day, YYYY-MM-DD
Level 3: File zip compress site, MySQL folder, Nginx folder
Level 4: mysql backup file in MySQL folder and Nginx conf file in Nginx folder
So, delete help to delete file zip compress site, mysql backup file, nginx config file
But rmdir cannot remove YYYY-MM-DD cause YYYY-MM-DD have 2 empty folder inside
Here is my code:
pi@raspberrypi:~ $ rclone -q --min-age 1s rmdirs google_drive:marabahan_backup/by_date/*
2018/01/29 23:21:59 ERROR : Google drive root 'marabahan_backup/by_date/*': Failed to list "": directory not found
2018/01/29 23:22:00 ERROR : : Failed to rmdir: directory not empty
2018/01/29 23:22:00 ERROR : Attempt 1/3 failed with 2 errors and: directory not empty
2018/01/29 23:22:00 ERROR : Google drive root 'marabahan_backup/by_date/*': Failed to list "": directory not found
2018/01/29 23:22:01 ERROR : : Failed to rmdir: directory not empty
2018/01/29 23:22:01 ERROR : Attempt 2/3 failed with 2 errors and: directory not empty
2018/01/29 23:22:01 ERROR : Google drive root 'marabahan_backup/by_date/*': Failed to list "": directory not found
2018/01/29 23:22:02 ERROR : : Failed to rmdir: directory not empty
2018/01/29 23:22:02 ERROR : Attempt 3/3 failed with 2 errors and: directory not empty
2018/01/29 23:22:02 Failed to rmdirs: directory not empty
i already make sure when doing rclone lsd that there are subfolder in those remote folder.
why this can be happen as previous answer seems already solved ?