Unable to rename site – error DK0058

Every time I attempt to rename a site, I get the DK0058 error. I have tried what the support site says (delete the folder and retry) but I always get the DK0058 error no matter what.

This is what the log says about my latest attempt:

[2024-03-01 13:49:02.196] [info]  [dockerUtil/getContainer] Get 'devkinsta_fpm' Docker container
[2024-03-01 13:49:02.244] [info]  [ProgressIndicator] { isFailed: false, isOpen: false }
[2024-03-01 13:49:02.267] [info]  [ProgressIndicator] { isFailed: false, isOpen: false }
[2024-03-01 13:49:03.630] [info]  [ProgressIndicator] { isFailed: false, isOpen: true }
[2024-03-01 13:50:19.884] [info]  [containerExec] Command 'cp -a /www/kinsta/public/mylivesite/. /www/kinsta/public/mystagingsite' on devkinsta_fpm finished with exit code 1
[2024-03-01 13:50:19.896] [info]  [copyFiles] Source folder removed successfully.
[2024-03-01 13:50:19.897] [info]  [copyFiles] Moving files completed successfully
[2024-03-01 13:50:19.902] [error] Error - DK0058: COPY_FILES: [copyFiles] Failed to copy files from /www/kinsta/public/mylivesite to /www/kinsta/public/mystagingsite
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:841401
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1828882)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1830531)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829431)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1820727)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821026)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-03-01 13:50:19.914] [error] [ipcMainStep] Error in operation RENAME_SITE, step copyFiles: Error - DK0058: COPY_FILES: [copyFiles] Failed to copy files from /www/kinsta/public/mylivesite to /www/kinsta/public/mystagingsite
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:841401
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1828882)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1830531)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1829431)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1820727)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:1821026)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Hi @halshak! Welcome to the Kinsta community!

I’m sorry to hear that you are having difficulty with renaming your site. I understand seeing this type of error can be frustrating. We are happy to help and want to ensure that this error is resolved as soon as possible!

It looks like the “RENAME_SITE” action is failing at the copyFiles step. Unfortunately, I’m not specifically seeing the reason for this failure in the log. I do want to verify a few things regarding your system environment however that will help us in our investigation.

Could you please answer the following questions?

Q: DevKinsta Version

Q: OS Version

Q: Docker Desktop Version

This information will help us in our investigation and possibly in determining the root cause of the issue.

We look forward to hearing from you!

Hi @Andrew:

DevKinsta 2.13.1 (2.13.1.8585)
macOS 14.3.1
Docker Desktop 4.28.0

Thanks.

Hello @halshak :wave:

If you haven’t already, please fully exit from DevKinsta and Docker Desktop. After doing so, re-launch DevKinsta and attempt to rename your site again. If the issue persists, I recommend increasing the virtual disk limit allocated for DevKinsta in your Docker Settings > Resources page.

Let us know how it goes!

I usually shut down DevKinsta and Docker after I’m done working on something, so I launched them and increased the virtual disk limit to 400 GB in Docker and I still get the error.

Comparing the new folder with the one I’m trying to rename, I see they are almost identical in size when the copy files step fails, save for missing one file (don’t know what it is).

CleanShot 2024-03-05 at 08.40.48

Hi @halshak :wave:

I’ve never encountered this error/issue on my Linux Ubuntu O/S (I don’t have Mac machine here so can’t really test to replicate) :sweat_smile: .
I also have just now re-tested to rename my local site(s) using DevKinsta 2.13.1 on my Linux Ubuntu 22.04, and so far all seemed to be working fine still (didn’t get that Error - DK0058: COPY_FILES error).

Now I’m wondering, what if you delete/remove it completely first, and then re-create the new site folder name mystagingsite manually - that’s located under the ~/DevKinsta/public folder
so, from your Mac terminal - with your local user account, please create that new site folder with this command line: mkdir mystagingsite .

Once re-created manually, please fully shutdown both DevKinsta and Docker completely (not just minimized), and relaunch DevKinsta , and try to rename that mylivesite site to that new site name mystagingsite , and see if the source files/folders from that existing site can be copied properly to that new site’s folder?

Another thing, though I’m still unsure about this, but worth to check, if you can please run the following command line in your Mac Terminal (within the ~/DevKinsta/public/mylivesite/ sub-folder):
find . -xtype l -ls
(and if you can copy-paste the results too here), just curious if there’s any such broken symlink file(s)/folder(s) inside that current local site’s folder - and if that’s the issue here - as from your last screenshot, looks like there’s 1 missing item (file or folder) :thinking:

Please let us know the results for this test (and the error message too if any) :pray:

Best regards,
Agus Utomo

Hi @Agus

I tried creating the new folder manually, then running the rename function on a freshly-launched DevKinsta and Docker, and I still get the same DK0058 error.

I tried that command in Terminal and got this: find: -xtype: unknown primary or operator.

Hi @halshak! Thanks for your reply.

I’m sorry to hear that the error is continuing to occur even after creating the new folder. We are continuing to look into the cause of this error. We will be following up as soon as possible with an update.

Regarding the command to find broken symlinks, it appears there is a slight difference in the Mac version compared to the Linux version regarding which options it supports. Please try running the following command in the ~/DevKinsta/public/mylivesite/ subfolder:

find -L . -type l -ls

If you could please copy/paste the output of that command here it is appreciated and will help us in our investigation.

Best regards

Hi,

I entered that command and got no output, so I’m guessing there are no symlink issues.

Hi @halshak

This seems to be pretty complex and I do apologize for the back and forth, but after reviewing this there are other steps you can try.

  1. Open the Devkinsta FPM terminal (you should be able to do this from the Docker)

  2. Make sure a folder /www/kinsta/public/mystagingsite exists there and it is empty.

  3. Execute cp - a /www/kinsta/public/mylivesite/. /www/kinsta/ public/ mystagingsite

  4. Let me know if there’s an error and what the error is

Kind regards

Hi,

After I run that command in Docker I get this error:

cp: target 'mystagingsite' is not a directory

I also want to note that if I add a site (using “New Wordpress site”), I can rename that without an issue. It seems to only happen with the import from our live or staging environment.

Another thing I tried was removing anything we added to the root folder (favicons, folders) and that seemed to copy all files (size and file count are identical) but then it still fails.

And when I cancel and it deletes all the files, but leaves the folder behind with wp-content/uploads inside.

Hi @halshak,

Thank you for your response!
It looks like the folder you’re trying to use doesn’t exist, which is why you get that error, which is expected to occur.

A quick command to create the folder through SSH/Terminal would be:
mkdir /www/kinsta/public/mystagingsite

That will create the folder, and from that point on, the path will be valid, so in theory the previous operation should work.

Please do let us how it goes.
Thank you in advance!

Sincerely,
Andre F.

I am very confused.

Hello @halshak

This might be a glitch in the screenshot but it seems as if there’s a blank space in the other part of the command. I also see that’s how I suggested it above, it’s a mistake on my end.

Can you try running this:

cp -a /www/kinsta/public/mylivesite/. /www/kinsta/public/mystagingsite

I apologize for the back and forth.

Kind regards,

This helped, I now see some more useful errors.

Three errors in relation to three specific files that look like this:

cp: cannot create regular file '/www/kinsta/public/mystagingsite/./wp-content/uploads/2016/08/Internal-Control-Resolver-300x157.png': Too many open files in system

And one like this:

cp: cannot stat '/www/kinsta/public/mylivesite/./wp-content/themes/resolver/assets/js/resolver-source-js/js/_resolver-homepage.js': No such file or directory

If I run the command again, it produces the same errors but with other files.

Hey again @halshak

What do you get if you run ulimit -n?

Please let me know what’s the output. Thank you!

# ulimit -n   
1048576