1

I am getting following error while archiving the user's homedirectory. (trying to migrate a user from one macbook to other since the user's keys are associated with AWS and other tools)

tar cfv user1.tar --exclude 'user1/downloads' user1

tar: Error exit delayed from previous errors.

After archiving around 70% getting the above error message.

I've read many documents and tried all the advices but still getting same error.

user1/Music/iTunes/iTunes Media/Automatically Add to iTunes.localized/.localized/Japanese.strings user1/Music/iTunes/iTunes Media/Automatically Add to iTunes.localized/.localized/ar.strings user1/Music/iTunes/iTunes Media/Automatically Add to iTunes.localized/.localized/French.strings tar: Error exit delayed from previous errors. user1-MacBook-Pro:Users user1$

  • add -v ftp.gnu.org/old-gnu/Manuals/tar-1.12/html_node/tar_16.html to see where the issue is – saviour123 Mar 27 '19 at 19:56
  • -v already running in verbose mode. – Kiron Mar 27 '19 at 19:59
  • why not just archive the folders one by one.. This itunes things, is the music folder which you can backup separately – saviour123 Mar 27 '19 at 19:59
  • I've tried exclude on "Music" folder later I got issues on Picture folder and excluded that one as well. Now I am getting same error at id_rsa file. I can't exclude that file. Because my ultimate goal is to get those files along with the user account. I strongly believe there would be some solution. – Kiron Mar 27 '19 at 20:39
  • Is the tar file created? Do you have enough disk space in the directory you are running the command in? If you are low in space, you can add a z to cfv to compress the tar file. – Mark Stewart Mar 27 '19 at 21:29
0

I am glad to share the solutions which I found after various troubleshooting and with help of few google links.

  1. We must avoid using -v and try

    tar cf user1.tar --exclude 'user1/downloads' user1 > /dev/null

    It will then print the errors on stdout. Otherwise in verbose mode it was waiting for few error messages and once it reaches certain number them displaying the final error message and exiting. After doing the above command with the stdout error messages I realized that I do not have enough permissions to certain file even after trying as a “root”. Then I found the below second solutions.

  2. By default terminal (on mac) doesn't have full disk access. So first we need to give full access to terminal Which can be done by selecting little apple logo on top left corner of the screen—> System Preferences —> Security & Privacy —> unlock the little Lock Icon on the bottom—>Privacy—> Hit little ‘+’ symbol—>Applications—>Utilities—>terminal Make sure it is added to the box.

That is it. Tar worked fine after performing above two steps. Hope this helps others

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.