[SOLVED] CLI assets sync error! Manually deleted assets from the disk

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ x ] Documentation issue or request

Current behavior

I have a problem with assets. The files are stored in the Assets folder. For some reason, some files were manually deleted from this folder.
Now we need to copy the app to app2 via the CLI.
I try sq.exe sync out testOut and get 404 for the files. The rest of the data exports successfully.

I try sq.exe sync in testOut in another application and the process hangs because it cannot load the missing file.

How can I skip manually deleted assets?
Broken files should be deleted or skipped during export.
There is another option - to restore dummy asset files and delete them manually. But there are a lot of them and I don’t see an automatic tool.

Tried settings
rebuild:assets: true
rebuild:assetFiles: true

In this case I get another error

Expected behavior

Resolve error with manually deleted asset files and data in db when copy to another app via CLI.

Minimal reproduction of the problem

Delete asset file from Assets folder. Then do
.\sq.exe sync out <folder>
.\sq.exe config use <another_appprofile>
.\sq.exe sync in <folder>


App Name:

  • [ x ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 6.4.0

Partially touches on this topic

Why do you do that? :wink:

I study the possibilities of CLI.
At first, when the files were deleted, the team did not yet know that they should not be manually deleted from the Assets folder)

Do you want to ignore broken assets during export (sync out) or import (sync in)?

Due to broken assets, it is not possible to make an import (sync in). Ideally, it would be nice to have this option in both cases.

Makes sense, but how would you repair them then? I could write the broken assets to a file so that you get a full list.

You can add a flag to ignore broken assets so that the user can choose whether to use it or not. Writing to a file is a good idea.
If we lost the blob file, then I think we can’t return the asset?)

I have tested it and it was never hanging. I have improved the error message for this but it was just going forward. Perhaps you tried an old version?

It seems that I still do not understand your requirements.

I use cli-v8.18.0
Hangup was with sync in. I see the error Could not find file and nothing happens

to ignore broken assets during import

I could not reproduce it, with the version you mentioned.

EDIT: Now I can.

Sorry, result was not hanging when do sync in. After a while I get this error
Do in new version sync in

I have deployed a new version that increases the timeout.

1 Like

There is a bug in the last commit. The logger was not passed as a parameter.
I used the version from the master branch, passed the logger and the import worked.

This topic was automatically closed after 2 days. New replies are no longer allowed.