Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide way to override "found other export database files" warning #1546

Open
jasonhollis opened this issue May 15, 2024 · 7 comments
Open
Labels
feature request New feature or request

Comments

@jasonhollis
Copy link

osxphotos export /Volumes/Photos --exiftool --update --ramdb --download-missing --touch-file --use-photokit --finder-tag-keywords --directory "{folder_album}" --post-command-error continue
Using last opened Photos library: /Users/biaginoguzzo/Pictures/Photos Library-1-3-2024.photoslibrary
WARNING: found other export database files in this destination directory branch. This likely means you are attempting to export files into a directory
that is either the parent or a child directory of a previous export. Proceeding may cause your exported files to be overwritten.
You are exporting to /Volumes/Photos, found .osxphotos_export.db files in:
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-12_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-15_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-11_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-09_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-10_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-14_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-04-02_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-04-22_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-04-15_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-04-29_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-13_0100/.osxphotos_export.db
/Volumes/Photos/@Recently-Snapshot/GMT+10_2024-05-06_0100/.osxphotos_export.db
Do you want to continue? [y/N]: n

It's detecting all of the .osxphotos_export.db in all of the snapshots. I'm glad it detects this and even happier that I do have snapshots, just in case. Now, how do I force the run or automate around this issue? This is killing me. I have my Shortcut Slink and Plist with Launchctl working perfectly. I just need to put this to sleep.

I have tried everything that looked obvious.

@oPromessa
Copy link
Contributor

Hello fellow osxphotos user!

From what I read you (may) have two options:

  1. Are you using a QNAP NAS?
  2. Consider using the --ignore-exportdb option. Run osxphotos help export to get an explanation.
  -F, --ignore-exportdb           If exporting to a directory that already
                                  contains an export database and --update is
                                  not specified, do not prompt to continue but
                                  instead continue the export. Normally, if
                                  you export to a directory that already
                                  contains an export database and do not
                                  specify --update, osxphotos will prompt you
                                  to continue. This is because you may be
                                  inadvertently merging two export sets. Use
                                  --ignore-exportdb to skip this prompt and
                                  continue the export. The resulting export
                                  database will contain the combined state of
                                  both export sets. Short option is '-F'
                                  (mnemonic: force export). See also --update.

@jasonhollis
Copy link
Author

Thanks for your help! LOL I’ve been running Qnap’s for myself and clients for over twenty years and never thought about killing the snapshot visibility. That should work. Because I’m running —update the -F command doesn’t work. I already tried that one.

@RhetTbull
Copy link
Owner

This warning is because I've accidentally overwritten my own backup. In most cases I don't see a valid use case for exporting to the same parent directory. I could extend the -F flag to cover this scenario or could add a separate flag. OSXPhotos should provide a way to override the warning if you really want to do this.

@RhetTbull
Copy link
Owner

@jasonhollis I'll add a way to override this warning. In the meantime, you can use yes | osxphotos export ... to force the "Y" entry to override the warning.

@RhetTbull RhetTbull changed the title Snapshots being detected and are scaring Osxphotos Provide way to override "found other export database files" warning May 16, 2024
@RhetTbull RhetTbull added feature request New feature or request labels May 16, 2024
@jasonhollis
Copy link
Author

jasonhollis commented May 17, 2024 via email

@RhetTbull
Copy link
Owner

So it’s just a YES at the end of the line?

Yes, the yes command simply prints y followed by newline to stdout. If you just type it on the command line you'll get an infinite stream of y characters. It's sole purpose is things like this where you need to force a prompt to continue.

@jasonhollis
Copy link
Author

jasonhollis commented May 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants