Skip to content

Google Drive: Add flag for keepRevisionForever #1525

Closed

Description

@jahands

Google Drive by default keeps previous versions of a file for 30 days.
However they can be kept forever if you set keepRevisionForever to true.
https://developers.google.com/drive/v3/web/manage-revisions

This would be really useful for certain documents where I may need to revert to a previous version.
While I do of course have other backups, sometimes it's just easier to revert via Drive.

Would it be possible to add this?
Thanks.

What is your rclone version (eg output from rclone -V)
1.36
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Win10, 64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone copy file gd: --drive-keep-revision
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
2017/07/12 09:45:38 Fatal error: unknown flag: --drive-keep-revision

Activity

  1. jahands commented on Jul 12, 2017

    @jahands
    ContributorAuthor
  2. ncw commented on Jul 13, 2017

    @ncw
    Member

    This was discussed in the forum and the conclusion was the v2 API could pin things which is nearly as good.

  3. jahands commented on Jul 13, 2017

    @jahands
    ContributorAuthor

    Ok, reading the Migration to v3 guide, it looks like pinned and keepRevisionForever are equivalent.

    I think the flag should be --drive-keep-forever or --drive-keep-revision-forever so it matches the flag in the v3 API.

  4. Cubox commented on Aug 1, 2017

    @Cubox
    Contributor

    Implementing keepRevisionForever requires using the v3 drive API. #320
    Once we are using the v3 api, it's pretty easy to add a flag for it. (Two lines of code).

  5. jahands commented on Feb 7, 2018

    @jahands
    ContributorAuthor

    Does #2007 mean this could possibly get added soon? :)

  6. ncw commented on Feb 7, 2018

    @ncw
    Member

    @jahands don't see why not!

  7. added this to the v1.40 milestone on Feb 7, 2018
  8. modified the milestones: v1.40, v1.41 on Mar 19, 2018
  9. modified the milestones: v1.41, v1.42 on Apr 28, 2018
  10. lewapm commented on Jun 6, 2018

    @lewapm
    Contributor

    I would like to solve this issue.

  11. ncw commented on Jun 6, 2018

    @ncw
    Member

    That's great @lewapm let me know if you need help with anything.

  12. added 6 commits that reference this issue on Jun 11, 2018
    47974ac
    2db0e0a
    f8348ec
    ad2d5e5
    cf19049
    772a1bd
  13. modified the milestones: v1.42, v1.43 on Jun 17, 2018
  14. ncw commented on Jun 17, 2018

    @ncw
    Member

    Thanks to @lewapm this is now done in this beta

    https://beta.rclone.org/v1.42-004-g84424986/ (uploaded in 15-30 mins)

    Which will be in the latest beta from now on and v1.43

  15. xponentia commented on Aug 14, 2018

    @xponentia

    @lewapm Thanks so much I was just looking for this feature and looking forward to testing it out.

  16. added a commit that references this issue on Jul 20, 2026
    a610661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions