iCloud Backup - beta 311013
Guys, just looking for some insight. I wanted to do a zquick and dirty backup of everything in MyDocuments folder to a folder on iCloud.
I just used shutils.copytree(source, dest) with no other params. It seemed to work nicely, and was fast. I have a lot of crap.
Is this a valid thing to do? Have little exp doing this stuff and was a little worried I might be doing something bad.
I didn't post any code here, didn't want anyone to follow in case this is very bad.
cvp last edited by cvp
Which destination did you define to go to an iCloud folder?
Sorry, I didn't remark you were in the beta version 😰
@cvp , I used _dest = '/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/Py3Bak/'
As my dest folder. Py3Bak cant exist when you run shutil.copytree
I got this path just by saving a .py on the root of iCloud and used the editor.path() to get the path of the file. I am sure I will find out there is an easier way. But I am about to write an issue on the Pythonista github issues, as after this my Pythonista app started going very slow. I did a full restart etc...Still the same. Then when I deleted the Py3Bak dir that contained all the files, things appear top be back to normal.
But I copied everything in Documents down. It's a lot. Anyway, I will post an issue.
omz last edited by omz
I'd recommend creating a zip file instead of copying the whole tree for better performance.
@omz , in this case was just looking to do a quick and dirty back up. But later would like to access the files with multiple devices, so in that case I wont want them zipped
omz last edited by
@Phuket2 How many files are we talking about? In any case, I'm considering some changes with regards to how iCloud files are indexed, and this might solve the problem (not entirely sure yet).
@omz , ok. But was 18,098 files. I know its a lot, but ideally it wouldn't matter
cvp last edited by
@omz Is that a new feature of version 3 or is it accessible for the App Store version?
cvp last edited by
@Phuket2 Thanks for the info
I'm not estonished there are problems.
By example, with the FileBrowser app, the Files App of Apple, even if it shows the FileBrowser app folder on its "on my iPad", does not show the files, or at least not always.
I think the FilesApp is not yet really operational.
@cvp , I understand. But I am still very happy. This will only be a matter of weeks before this stuff is working very well. Just to have the option is such a break through I think. I think the tech is secondary to the will to do it. The tech will get sorted out, the will to open the door has been the biggest issue:)