Backup of import fails
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- TobiasMadsen
- Posts: 14
- Joined: 04 Dec 2020, 09:57
Backup of import fails
Hi Aimeos
I'm importing categories (and after that, products - question is the same), but get the following fail:
The category gets imported as it should but the backup fails. My shop.php is like this:
It is probably something stupid, but i just can't get it right!
For your reference; Folder structure is like picture attached. The "imported" folder is empty
I'm importing categories (and after that, products - question is the same), but get the following fail:
Code: Select all
Aimeos\Controller\Jobs\Exception
Unable to move imported file "imports/categories/toimport/" to "imports/categories/imported/imported_18-12-20.csv"
at C:\laravel_webshop\ext\ai-controller-jobs\controller\jobs\src\Controller\Jobs\Catalog\Import\Csv\Standard.php:378
374▕
375▕ if( !empty( $backup ) && @rename( $path, strftime( $backup ) ) === false )
376▕ {
377▕ $msg = sprintf( 'Unable to move imported file "%1$s" to "%2$s"', $path, strftime( $backup ) );
➜ 378▕ throw new \Aimeos\Controller\Jobs\Exception( $msg );
379▕ }
380▕ }
381▕
382▕
1 C:\laravel_webshop\vendor\aimeos\aimeos-laravel\src\Aimeos\Shop\Command\JobsCommand.php:76
Aimeos\Controller\Jobs\Catalog\Import\Csv\Standard::run()
2 C:\laravel_webshop\vendor\aimeos\aimeos-core\lib\mwlib\src\MW\Process\Decorator\Check.php:63
Aimeos\Shop\Command\JobsCommand::Aimeos\Shop\Command\{closure}(Object(Aimeos\MShop\Context\Item\Standard), Object(Aimeos\Bootstrap), "catalog/import/csv")
Code: Select all
'catalog' => [
'import' => [
'csv' => [
'location' => 'imports/categories/toimport/',
'backup' => 'imports/categories/imported/imported_%d-%m-%y.csv',
'skip-lines' => 1,
],
],
],
For your reference; Folder structure is like picture attached. The "imported" folder is empty
- Attachments
-
- folder backuo.png (2.1 KiB) Viewed 815 times
Re: Backup of import fails
Most likely, it's a permission problem. Your cronjob is executed as another user than your web server, so check the permissions of the backup directory.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- TobiasMadsen
- Posts: 14
- Joined: 04 Dec 2020, 09:57
Re: Backup of import fails
As of now i am running the command directly from terminal.
I have tried both locally on my Win10 environment and on the Debian server (with www-data as owner of folders). On the server it works, so thats fine.
Thank you for your response
I have tried both locally on my Win10 environment and on the Debian server (with www-data as owner of folders). On the server it works, so thats fine.
Thank you for your response