Open langdonms opened 2 months ago
Getting issue with move, maybe doesn't need Owner argument just backup folder ID.
Exporting item
Exporting item complete
Moving item to f74cc94ec1dc4ac8b8a16742c799b4fb
Failed to move item move() got an unexpected keyword argument 'owner'
Item 3 of total 221 complete
ID of backup 73909d481e5844648c7ee607889a7ee6
Yup, removing the owner argument in move folder, it is now working. Still need to make sure it doesn't try to do duplicate moves.
Exporting item complete
Moving item to f74cc94ec1dc4ac8b8a16742c799b4fb
Moving item complete
Item 3 of total 221 complete
ID of backup ee6f2b2138144906a36d62f8a1f27ee9```
Features are failing to move because already exist in folder; perhaps spit these out into a list for further clean-up
If item's ownerFolder = None
then it's in the home folder
The backup process was generally failing for a couple reasons.
a change in the API resulted in only being able to delete items in batches of 100, so had to create a batch loop logic.
The symptoms were duplicate file geodatabases being found by the search for FGDBs to move; however, once a FGDB is moved to the backup folder, another by the same name cannot be moved there, despite AGO allowing things to be named the same. Duplicates must be purged and/or only one is selected using a set() function in the search.
This may have been caused by ad hoc backups created over time, or also at least one FGDB had Delete Protection checked in its settings, which did not allow for it to be deleted by the script.