-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The --extra-files <file...>
command is unintuitive
#283
Comments
@Prince213 Unless I'm missing something, it's still counter-intuitive because you don't get to specify the source and destination, as described in the initial report. |
It's not an exact solution. Instead, the entire path will be copied to the destination, so you can just create the directory structure and put files there. Maybe we can add another option for individual files. |
I'm trying to copy my local
ah, now I get it! it actually copies files from /persist/* to /mnt/*. so I'll have to fiddle with softlikns. ugh. this sucks. wow, it's even worse: tar can't unpack if
now, this:
fails:
would've been so much easier if you added p.s. in case someone finds this for keyword "impermanence" "sops "zfs" - here's an (inelegant) solution:
|
Use
Then pass If /persist and / are on the same zpool this will use copy on write. Everything in /target will be copied on top of / on the new system. |
They are not, and how would that help even if they were? Passing /persist is not the problem.
well, that doesn't solve my problem - I need contents of local /persist/* (which is a dataset on zfs) to be copied to remote /persist/ (which is also a dataset on zfs). The problem is that |
The tar command used is: nixos-anywhere/src/nixos-anywhere.sh Line 589 in f9d38ca
tar copies soft links by default (doesn't follow), so you cannot do what you tried as the error shows. The Effectively[1] this is:
which is not:
The contents of the path (not the directory) you pass to
this shows my suggestion would place a copy of For those without a COW filesystem one could use
which will create hard links (not using more storage) which tar will copy. [1] scp follows symlinks |
all of that is correct but misses the point entirely. I can read bash :) the tar archive contains something like
when tar -xf- happens on the target machine, it fails because /persist already exists there. this is the problem, not how to get files tar'd, my method of symlinking also works fine. I solved it by deconstructing the process and using phases, then using
between the Also, I mentioned another problem with nixos-anywhere. To be able to use SOPS I need to control the If only nixos-anywhere fixed those two problems (allow |
This is documented using the |
Hello,
I just wanted to point out that the
--extra-files <file...>
command is a bit unintuitive, I had to look it up on Github. A better way would be--extra-files <file> <dest>
.The text was updated successfully, but these errors were encountered: