• Resolved LaurentAngeli

    (@laurentangeli)


    Hi Liuta Ovidiu,

    When Xcloner clean backups from remote Google Drive, they are stored in trashcan. Problem is that trashcan size in included in free 15Go offered by Google.
    Would it be possible to add an option to ‘permanently delete’ backups (delete them from trashcan after deleted from original folder) ?

    Thanks in advance.

    Laurent

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor XCloner

    (@xcloner)

    Hi Laurent, please install the development version from here https://downloads.www.ads-software.com/plugin/xcloner-backup-and-restore.zip , i have added an option called “Automatically Empty Google Drive Trash” in the XCloner Remote Storage->Google Drive Tab which, if active, will empty all the google drive trash, please note, this will delete non-backup files as well.

    The emptyTrash call is made when verifying the google drive connection or when uploading a backup to it.

    Let me know if you have any issues with it.

    Thread Starter LaurentAngeli

    (@laurentangeli)

    Liuta,
    Thanks for this quick reply !

    This works fine for me as i am using Google drive account only to put my Xcloner backup in it…
    This new version does the job well. I could check that trashcan is cleaned on verify connection.

    Thanks for this update.

    However, my use of Google Drive account is certainly not the use case of everyone.

    So I think that cleaning only backup files would please a lot more of users.

    I have checked Google drive library used in Xcloner Google Drive plugin and found out that GoogleDriveAdapter->delete() function is only updating setTrashed to true to delete file :
    File: xcloner-google-drive\vendor\nao-pon\flysystem-google-drive\src\GoogleDriveAdapter.php
    278: $file->setTrashed(true);
    280: if ($this->service->files->update($id, $file, $opts)) {

    Solution should be to add a new method (deleteNoTrash) using $this->service->files->delete() which delete file without trashing it.
    This new method should be called only if option ‘Really delete backups (no trashing)’ is checked…

    I hope that makes sens…

    Anyway, thanks for this new version which avoid me to delete trashcans manually.

    Kind regards

    Laurent

    Plugin Contributor XCloner

    (@xcloner)

    You are right. I have made an update to the xcloner-google-drive plugin, version 1.0.2, please update that version and also reinstall XCloner latest development release. Let me know if you encounter any issues

    Thread Starter LaurentAngeli

    (@laurentangeli)

    It works well !

    Backups are deleted from original folder and are not in trashcan anymore with ‘Keeps Deleted Backups in Trash’ disabled.

    Thanks again for this fast fix.
    I mark this subject resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Delete backups from trash…’ is closed to new replies.