GAM ADV-X copy folder recursively - continue if failed?

198 views
Skip to first unread message

Beorn

unread,
Oct 2, 2017, 9:09:09 PM10/2/17
to GAM for G Suite
Hi,

I'm trying to copy a folder hierarchy of around 200,000 files/folders.  At around 1 operation per second it's going to take 2-3 days, which is not great but I can live with that.
  1. Except it fails after some hours.
  2. And there doesn't seem to be any way to restart/continue after a failure - more like a 'sync' than 'copy' operation, I guess.
Anyone have any idea how I should go about running this type of long operation?  I've also tried the "Copy Folder" Chrome extension, but it also fails after a file with CPU quota errors.


I'm using the latest GAM ADV-X, and the command I ran (id's changed):

  ./gam user myu...@mydomain.com copy drivefile 0B3zDH62HvZq3132WWVkzV1JZSWs newfilename MyNewCopy recursive



Example output:

               [...around 3000 lines...]
                        User: myu...@mydomain.com, Drive Folder: ALL, Drive Folder ID: 0BzeojblzIiI4Ql9PZjhVLWpvRlk, Created
                      User: myu...@mydomain.com, Drive Folder: 2013-08, Copied to: 20
ERROR: 500: unknownError - Unknown
13-08, Drive Folder ID: 0BzeojblzIiI4T0tzS0R5RTBpMzg
                    User: myu...@mydomain.com, Drive Folder: Some_N (2), Copied to: Some_N (2), Drive Folder ID: 0BzeojblzIiI4cDdLdHlNdjh3RG8
                  User: myu...@mydomain.com, Drive Folder: XYZ_4 (1), Copied to: XYZ_4 (1), Drive Folder ID: 0BzeojblzIiI4eXpBQ2h3OFRpQ1E (1/2)
                  User: myu...@mydomain.com, Drive Folder: XYZ_3 (11), Drive Folder ID: 0BzeojblzIiI4VWtIMUR0MEtPaFE, Created (2/2)
                    User: myu...@mydomain.com, Drive Folder: Some_N, Drive Folder ID: 0BzeojblzIiI4UTJXSXRabDlJdU0, Created
                      User: myu...@mydomain.com, Drive Folder: 2013-08, Drive Folder ID: 0BzeojblzIiI4NHFkMFNRQTJTUEk, Created
                    User: myu...@mydomain.com, Drive Folder: Some_N, Copied to: Some_N, Drive Folder ID: 0BzeojblzIiI4UTJXSXRabDlJdU0
                  User: myu...@mydomain.com, Drive Folder: XYZ_3 (11), Copied to: XYZ_3 (11), Drive Folder ID: 0BzeojblzIiI4VWtIMUR0MEtPaFE (2/2)
                User: myu...@mydomain.com, Drive Folder: 2013-08 (1), Copied to: 2013-08 (1), Drive Folder ID: 0BzeojblzIiI4Q3VORk9QTkItSW8 (2/18)
                User: myu...@mydomain.com, Drive Folder: 2012-03, Drive Folder ID: 0BzeojblzIiI4cFZ0eTAwYWdWZms, Created (3/18)
               [stops]

Ross Scroggs

unread,
Oct 3, 2017, 11:45:41 AM10/3/17
to google-ap...@googlegroups.com
Bjorn,

I've updated GAMADV-X to handle "ERROR: 500: unknownError - Unknown" as recoverable.
I can't think of a way to do a sync; since you can have multiple files in a folder, all with the same name, how can you tell whether a file has been copied or not?
It seems to me that you'll have to delete MyNewCopy and start over.
Why do you want copies of 200,000 files? What are you trying to achieve? Might there be a cheaper solution?

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/74312bcd-bdef-4ee7-b2bb-014bb1368b0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages