richartkeil / notion-guardian

🛡✍️ Keeps your Notion workspace safe and version controlled at all times.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when export zip file > 500 MB

HCui91 opened this issue · comments

commented

It seemed that notion export zip file has sub zip archives if the export zip > 500 MB. I started to have this issue recently as the archive file size slowly increasing.

GitHub Action log:

[main 124f791] Automated Notion workspace backup
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 Export-***-Part-1.zip
remote: error: Trace: ***        
remote: error: See http://git.io/iEPt8g for more information.        
remote: error: File Export-***-Part-1.zip is 498.13 MB; this exceeds GitHub's file size limit of 100.00 MB        
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com./        
To https://github.com/***/***
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/***/***'
Error: Process completed with exit code 1.

It might be something about the extract function at

await extract(workspaceZip, { dir: workspaceDir });

which is imported from
const extract = require(`extract-zip`);

But I have completely no knowledge of JS so please fix it.

Usually, the large zip files should not be committed themselves, but only their extracted content. Only then will you get the benefit of actually version controlling your notion workspace — letting Git only store content changes in each commit, instead of the whole .zip export each time. Why do you want to commit the .zip files instead of the extracted content?

commented

Hi richartkeil,
Thanks for your attention on this issue. It seemed that if the total exported archive > 500 MB, notion would create Part-x.zip inside the final output zip archive. Merge branch 'fix-large-export-zip'

Interesting, obviously this use case should be supported. I'll have a look.