Code Monkey home page Code Monkey logo

Comments (18)

zhangxiaoyu2046 avatar zhangxiaoyu2046 commented on August 15, 2024 12

I gave up. After trying all the above methods, my iterm2 is still losing the preference and profile config.
Now I just mackup uninstall and my iterm2 profile came back finally.
I think this fatal bug makes a lot of people give up using mackup, and really hope this issue can be fixed in some later versions.

from mackup.

ytra avatar ytra commented on August 15, 2024 5

I ran into the same issue. The tips from here did not work for me. After cleaning everything up I thought it wasn't a good idea to run this backup from within a iTerm2 terminal but from the default macOS terminal instead.
There it ran without any problems.

from mackup.

chenhaitao9527 avatar chenhaitao9527 commented on August 15, 2024 4

Try this replacement iterm2.cfg; which needs to go into ${HOME}/.mackup (you'll need to create this directory if you don't have one already):

[application]
name = iTerm2

[configuration_files]
Library/Preferences/com.googlecode.iterm2.plist
Library/Application Support/iTerm2/DynamicProfiles

The original config tries to backup an iTerm2 directory ${HOME}/.config/iterm2/AppSupport/DynamicProfiles; but on my machine, the parent "AppSupport" is a symlink - the modified config above targets the actual "DynamicProfiles" directory, not the symlinked version.

Would be useful to know if this works for anyone...

Maybe you need to add translation characters(\)

[application]
name = iTerm2

[configuration_files]
Library/Preferences/com.googlecode.iterm2.plist
Library/Application\ Support/iTerm2/DynamicProfiles

from mackup.

jamesrtnz avatar jamesrtnz commented on August 15, 2024 2

Try this replacement iterm2.cfg; which needs to go into ${HOME}/.mackup (you'll need to create this directory if you don't have one already):

[application]
name = iTerm2

[configuration_files]
Library/Preferences/com.googlecode.iterm2.plist
Library/Application Support/iTerm2/DynamicProfiles

The original config tries to backup an iTerm2 directory ${HOME}/.config/iterm2/AppSupport/DynamicProfiles; but on my machine, the parent "AppSupport" is a symlink - the modified config above targets the actual "DynamicProfiles" directory, not the symlinked version.

Would be useful to know if this works for anyone...

from mackup.

mgdigital avatar mgdigital commented on August 15, 2024 2

Same issue here, abandoning Mackup for now due to this :(

from mackup.

jamesrtnz avatar jamesrtnz commented on August 15, 2024 1

As mentioned in #1916 , the advice from the iTerm2 authors is to use the native cloud storage facility built into iTerm2; they stated iTerm2 won't work with the way Mackup symlinks the plist files.

from mackup.

timfee avatar timfee commented on August 15, 2024 1

Ditto - this is why I gave up

from mackup.

atahani avatar atahani commented on August 15, 2024

same issue on arm64

ProductName:		macOS
ProductVersion:		13.4
BuildVersion:		22F66
brew info mackup
==> mackup: stable 0.8.37 (bottled), HEAD
Keep your Mac's application settings in sync
https://github.com/lra/mackup
/opt/homebrew/Cellar/mackup/0.8.37 (1,364 files, 10.8MB) *
  Poured from bottle using the formulae.brew.sh API on 2023-06-16 at 10:25:23
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mackup.rb
License: GPL-3.0-or-later
==> Dependencies
Required: [email protected] ✔, six ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 0 (30 days), 0 (90 days), 0 (365 days)
install-on-request: 0 (30 days), 0 (90 days), 0 (365 days)
build-error: 0 (30 days)

from mackup.

manishie avatar manishie commented on August 15, 2024

Same exact issue for me...

from mackup.

timfee avatar timfee commented on August 15, 2024

No such luck in my case (on iCloud as a destination). I nuked the Mackup App Support directory (/Users/timfee/Library/Mobile Documents/com~apple~CloudDocs/Timtop/config/mackup/Library/Application Support/iTerm2) and re-ran the command.

It re-populate a (non-symlinked) DynamicProfiles folder in CloudDocs.

> mackup backup
Backing up Library/Application Support/iTerm2/DynamicProfiles ...
Traceback (most recent call last):
  File "/opt/homebrew/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.37', 'console_scripts', 'mackup')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/main.py", line 93, in main
    app.backup()
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/application.py", line 119, in backup
    utils.link(mackup_filepath, home_filepath)
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/utils.py", line 145, in link
    os.symlink(target, link_to)
FileExistsError: [Errno 17] File exists: '/Users/timfee/Library/Mobile Documents/com~apple~CloudDocs/Timtop/config/mackup/Library/Application Support/iTerm2/DynamicProfiles' -> '/Users/timfee/Library/Application Support/iTerm2/DynamicProfiles'

from mackup.

timfee avatar timfee commented on August 15, 2024

I lied :-)

The file in ~/.mackup must be named iterm2.cfg (mine was just iterm.cfg) for this to work. Thanks!

from mackup.

manishie avatar manishie commented on August 15, 2024

Didn't work. 🙁

➜  ~ mackup backup
Backing up Library/Application Support/iTerm2/DynamicProfiles ...
Traceback (most recent call last):
  File "/opt/homebrew/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.37', 'console_scripts', 'mackup')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/main.py", line 93, in main
    app.backup()
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/application.py", line 119, in backup
    utils.link(mackup_filepath, home_filepath)
  File "/opt/homebrew/Cellar/mackup/0.8.37/libexec/lib/python3.11/site-packages/mackup/utils.py", line 145, in link
    os.symlink(target, link_to)
FileExistsError: [Errno 17] File exists: '/Users/manishie/Dropbox/Mackup/Library/Application Support/iTerm2/DynamicProfiles' -> '/Users/manishie/Library/Application Support/iTerm2/DynamicProfiles'
➜  ~ cat .mackup/iterm2.cfg
[application]
name = iTerm2

[configuration_files]
Library/Preferences/com.googlecode.iterm2.plist
Library/Application Support/iTerm2/DynamicProfiles
➜  ~

from mackup.

jamesrtnz avatar jamesrtnz commented on August 15, 2024

@manishie : did you cleanup any existing older iTerm2 backup file(s) from the mackup backup directory like @timfee did?

@timfee : Thanks, I guess I'll raise a PR to get the file updated then....

from mackup.

taudor avatar taudor commented on August 15, 2024

Hi,
I still have the same issue, even with the fix (did the cleanup before).

from mackup.

nFec avatar nFec commented on August 15, 2024

[configuration_files]
Library/Preferences/com.googlecode.iterm2.plist
Library/Application Support/iTerm2/DynamicProfiles

worked for me! thanks.

from mackup.

jamesrtnz avatar jamesrtnz commented on August 15, 2024

Yes; noticed that myself the other day - presumably the iTerm2 software is recreating the directory on the fly; this issue needs more thought.

I'm running the latest 3.5beta myself, FYI.

Also, have noticed that my iTerm2 won't correctly read the symlinked properties file when it's moved to my Cloud Storage; if I backup to a local directory, it's fine. Annoying; and probably not a actual issue with Mackup; but with iTerm2 itself.

from mackup.

Angboo avatar Angboo commented on August 15, 2024

This problem also occurred to me. At the same time, I found that a large number of configurations became soft links but did not exist in the backup folder, resulting in the loss of a large number of application configurations, such as git's .gitconfig and asdf's .toolversion.

At present, it seems that for the backup function, modifying the user's original configuration is not a good idea. When a program error occurs, the original configuration will be lost. This is extremely fatal for both backup software and users.

from mackup.

gaspo53 avatar gaspo53 commented on August 15, 2024

Same issue here:
Backing up Library/Application Support/BraveSoftware/Brave-Browser/Default/Preferences ... Backing up .config/iterm2/AppSupport/DynamicProfiles ... Traceback (most recent call last): File "/opt/homebrew/bin/mackup", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/homebrew/lib/python3.12/site-packages/mackup/main.py", line 93, in main app.backup() File "/opt/homebrew/lib/python3.12/site-packages/mackup/application.py", line 112, in backup utils.link(mackup_filepath, home_filepath) File "/opt/homebrew/lib/python3.12/site-packages/mackup/utils.py", line 145, in link os.symlink(target, link_to) FileExistsError: [Errno 17] File exists: '/Users/gaspar/Library/Mobile Documents/com~apple~CloudDocs/Mackup/.config/iterm2/AppSupport/DynamicProfiles' -> '/Users/gaspar/.config/iterm2/AppSupport/DynamicProfiles'

from mackup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.