Support

Akeeba Backup for WordPress

#40757 post processing engine google drive

Posted in ‘Akeeba Backup for WordPress’
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

WordPress version
6.5.3
PHP version
7.4
Akeeba Backup version
7.9.2

Latest post by nicholas on Tuesday, 28 May 2024 11:51 CDT

nb4

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 10MiB, please upload it on your server and post a link to it.

 

When the backup is complete it is uploaded in my drive.

Usually, with other sites, when the backup is uploaded it is saved in an existing folder (_web/backup/sitename) - with this site, even if the folder exists, the backup is saved in a new folder (the folder _web is duplicated)

nicholas
Akeeba Staff
Manager

Is it a personal drive, or a team (shared) drive? Please specify.

Is the _web folder a folder belonging to your drive and created by you, or a folder created by someone else and shared with you? Please specify.

Do you have a folder called _web in your drive's Trash?

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!

nb4

It's my drive and I created the folder.

Once I delete the folder "_web" if I start a new backup when it' finished I can't find it in the original folder (_web/backup/sitename), but if I put back the deleted folder from the trash in my drive, inside I can find also the new backup.

nicholas
Akeeba Staff
Manager

OK, this is what I thought. Sigh.

Google Drive has a really weird organisation system because it was made to store documents from their productivity applications, not files. The thing was retrofitted with "folders" and "files" which are neither folders not files.

Each "folder" is just a label against a numeric identifier. Two or more numeric identifiers may have the same label, i.e. the same "folder name". Same for "files", which are just numeric identifiers with attached data.

When you take a backup, we have to translate your "folder names" into the actual numeric ID used by Google Drive. To do that, we ask Google Drive to list all folders in the drive root, find the one which looks like the first part of your "file path" (_web). Then we use that ID to gets its contents and find something which looks like the second path of your "file path" (backup). And so on and so forth. If an entity isn't found, we create a new "folder".

Here's the thing. Google Drive may NOT return the folder we're looking for, for reasons that have to do with Google Drive's implementation of their API, not our code (we use the method they themselves recommend in their documentation, i.e. a search query in the form of name='what_you_told_us' and mimeType = 'application/vnd.google-apps.folder'). In this case, a new one will be created. Moreover, Google Drive doesn't specify if a folder is in the trash or not when returning the search results, nor do they provide a way to specify "is not in the trash" in the search query (since there is no field specifying the "folder" / "file" is in the trash, i.e. you can't search against something they do not report). Therefore, we might end up using a folder that's in the trash, which is what happened with you the second time you tried. I am still trying to figure out if anyone has ever found a solution to that, since a different part of their documentation claims there SHOULD be a "trashed" field to tell us if a file / folder is trashed. Either the first part of their documentation is right and we can't exclude trashed folders, or the second is and we can exclude trashed folders. Yes, that's the quality of Google's documentation we have to work with…

Even if I do find to work around the "folder is in the trash" problem, the other problem which makes Google Drive sometimes – albeit very rarely – not return information about an existing "folder" seems to be unsolvable as it solely depends on the Google Drive API returning trustworthy information.

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!

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!