Support

Akeeba Backup for Joomla!

#30553 Follow up on 30466 - Files appearing in 2 locations in Drive

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by jgowans on Wednesday, 21 November 2018 06:17 CST

jgowans
Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:

Following up on issue 30466, just as an FYI, I've not confirmed the cause, however I can confirm that the issue only occurs when the "Part size for split archives" is modified from the default setting established using the configuration wizard (example attached). I've tested by changing the part size to 5mb and 10mb, and in both cases, the files appear in the target destination as well as in the "my drive" directory.

If I then re-run the config wizard, or remove/reinstall Akeeba then run config wizard, and use the default setting, the archives only appear in the target directory and everything works as expected.

This is just an FYI to provide additional information. It may be completely unique to my set up, however the issue is now consistent across an increasing # of sites (all basically config'd the same and all on the same environment).

Best,

Josh

nicholas
Akeeba Staff
Manager
Well, I can reproduce this issue but the fact remains that it's not Akeeba Backup's fault. Google Drive is broken!

There are two ways to upload files to Google Drive: chunked upload and simple upload. Chunked upload is mandatory for files over 5MB. Simple upload seems to be mandatory for files less than 5MB. Keep that in mind for a bit.

Let's say you have a backup that's 43MB. When your part size is 2048MB you only create a single file that's 43MB big. This means that the entire file is being uploaded with chunked upload and everything works file.

When you set the part size to 10MB you now have five files. Four files of 10 MB each and one file which is just 3 MB. The first four 10MB files upload with the chunked upload method and everything works file; they upload to the folder you told it to upload them to. The final file, however, is under 5MB. So it has to be uploaded with the simple upload method.

The simple upload method requires us to provide a Google Drive folder ID and a file name. I have confirmed that this information is provided correctly. However, Google Drive DOES NOT upload the file to the folder whose ID we provided. It uploads it to TWO places SIMULTANEOUSLY: the root of the Google Drive AND the folder we told it to upload to.

This is a case of Google Drive's API being completely daft. We send it the right data, only once (I checked six times!!!), yet it creates the same file in two places.

Another WTF fact about Google Drive that I just discovered is that you cannot use a folder name that you have already used and trashed. Even though trashed files do not appear in your Drive's web interface they are still reported by the API when you do a directory listing. Guess what happens if you use the name of an already trashed folder with Akeeba Backup? Google Drive tells us the folder exists and has us upload the file to the trashed folder. So the upload is taking place directly to the trash.

I have been writing backup software for 12 years. I have been writing integrations with remote storage providers for 9 years. I have never seen such an absolute trash of a service with this kind of nonsensical behavior as this horrible abomination called Google Drive. If you really value your data please, for the love of God, DO NOT USE GOOGLE DRIVE.

As you understand, there is nothing I can do on my end. What I previously considered unlikely (Google Drive's API being broken) is, in fact, exactly what is going on! The only thing you can reasonably do is use a part size for split archives which will not ever result in any archive parts under 5MB.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jgowans
Yup, I hear you and mainly just wanted 1) to report what I'd found and 2) confirm that I'm not crazy. :D Thanks for the response.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!