jckleiner / notion-backup

Automatic Notion workspace backup to Google Drive, Dropbox, pCloud, Nextcloud or to your local machine.
86 stars 33 forks source link

Downloaded file is nowhere to be found #16

Closed michaelamiller12 closed 7 months ago

michaelamiller12 commented 7 months ago

Firstly, I've managed to successfully clone and run everything well; thanks for making this repo!

However, I've run into an issue, where I'm able to successfully connect, export and download the file into a zip, and get the following message:

04:47:44.636 [main] INFO com.greydev.notionbackup.NotionClient - Notion response now contains the export url. 'state': 'success', Pages exported so far: 390, Status.type: complete
04:47:44.636 [main] INFO com.greydev.notionbackup.NotionClient - Notion API workspace export 'state': 'success', Pages exported so far: 390
04:47:44.636 [main] INFO com.greydev.notionbackup.NotionClient - Download link extracted
04:47:44.636 [main] INFO com.greydev.notionbackup.NotionClient - Downloading file...
04:47:44.654 [main] INFO com.greydev.notionbackup.NotionClient - Downloaded export will be saved to: /Users/mmiller8/Downloads
04:47:44.655 [main] INFO com.greydev.notionbackup.NotionClient - fileName: notion-export-html-flattened_2024-02-16_04-47-44.zip
04:47:44.656 [main] INFO com.greydev.notionbackup.NotionClient - Downloading file to: '/Users/mmiller8/Downloads/notion-export-html-flattened_2024-02-16_04-47-44.zip'
04:47:46.867 [main] INFO com.greydev.notionbackup.NotionClient - Download finished: notion-export-html-flattened_2024-02-16_04-47-44.zip
04:47:46.869 [ForkJoinPool.commonPool-worker-3] INFO com.greydev.notionbackup.NotionBackup - Both GOOGLE_DRIVE_SERVICE_ACCOUNT_SECRET_JSON and GOOGLE_DRIVE_SERVICE_ACCOUNT_SECRET_FILE_PATH are empty
04:47:46.870 [ForkJoinPool.commonPool-worker-3] INFO com.greydev.notionbackup.NotionBackup - Skipping Google Drive upload. No secret provided for Google Drive.
04:47:46.871 [ForkJoinPool.commonPool-worker-5] INFO com.greydev.notionbackup.NotionBackup - DROPBOX_ACCESS_TOKEN is blank. Trying to fetch an access token with the refresh token...
04:47:46.881 [ForkJoinPool.commonPool-worker-7] INFO com.greydev.notionbackup.NotionBackup - Skipping pCloud upload. PCLOUD_ACCESS_TOKEN or PCLOUD_API_HOST is blank.
04:47:46.881 [ForkJoinPool.commonPool-worker-3] INFO com.greydev.notionbackup.NotionBackup - Skipping Nextcloud upload. NEXTCLOUD_EMAIL, NEXTCLOUD_PASSWORD or NEXTCLOUD_WEBDAV_URL is blank.
04:47:46.881 [ForkJoinPool.commonPool-worker-5] INFO com.greydev.notionbackup.NotionBackup - Failed to fetch an access token. Either DROPBOX_REFRESH_TOKEN, DROPBOX_APP_KEY or DROPBOX_APP_SECRET is blank.
04:47:46.882 [ForkJoinPool.commonPool-worker-5] INFO com.greydev.notionbackup.NotionBackup - No Dropbox access token available. Skipping Dropbox upload.

Yet, the .zip is not in my downloads folder. I've tried designating other folders and all come with success messages but the .zip isn't showing up. I'm wondering if you could help with this? Thanks so much!

jckleiner commented 7 months ago

I assume you run the docker container locally and not with a GitHub action. The download folder you specify with DOWNLOADS_DIRECTORY_PATH is only changing the download directory inside the Docker container. Meaning if you don't mount a folder from your host system into the docker container, then you won't be able to access the downloaded file.

Below is an example of how you could mount your /Users/mmiller8/Downloads/ folder on your machine to the /downloads folder inside the container. Unset the DOWNLOADS_DIRECTORY_PATH variable (if you have configured it) and then after a successful run, you should see the download folder inside /Users/mmiller8/Downloads/.

docker run \
    --rm=true \
    --env-file=.env \
    -v /Users/mmiller8/Downloads/:/downloads \
    ghcr.io/jckleiner/notion-backup
michaelamiller12 commented 7 months ago

That works!! Thanks so much for your help 😊

jckleiner commented 7 months ago

Glad I could help :)