transfer home directroy to another machine (also running bazzite KDE)

I am trying to install bazzite on my deck while transfering over my main machine home directory (so i can keep the same kde theme and everything) I setup up my steam deck with the same username and password as my main machine and tared my home dir however I am having issues with permisions. shouldn't the user on my deck have the same permisions as the user on my main machine?
Solution:
perfect this worked flawlesly
tar --exclude='.local/share/polkit**' --exclude='.local/share/containers' --exclude='.local/share/Steam' --exclude='.local/share/chezmoi' --exclude='.local/share/waydroid' --exclude='.local/share/trash' --exclude='**waydroid**' --exclude='.local/share/flatpak' --exclude='.local/share/winapps' -cvp --acls --selinux --xattrs --same-owner -f homefolder.tar AppImages/ bin/ CE-Tables/ Desktop/ .config/ .gnupg/ .themes/ .var/ .webcatalog/ .wine/ .local/share/ .local/state/ .local/rEFInd_GUI/ rEFInd_GUI/ >> tar.log
tar --exclude='.local/share/polkit**' --exclude='.local/share/containers' --exclude='.local/share/Steam' --exclude='.local/share/chezmoi' --exclude='.local/share/waydroid' --exclude='.local/share/trash' --exclude='**waydroid**' --exclude='.local/share/flatpak' --exclude='.local/share/winapps' -cvp --acls --selinux --xattrs --same-owner -f homefolder.tar AppImages/ bin/ CE-Tables/ Desktop/ .config/ .gnupg/ .themes/ .var/ .webcatalog/ .wine/ .local/share/ .local/state/ .local/rEFInd_GUI/ rEFInd_GUI/ >> tar.log
...
Jump to solution
14 Replies
zany130
zany1302mo ago
to tar the files I just right clicked on the folders I wanted to transfer and selected compress and then I just extracted it into its place with dolphin i think that may have been my issue when doing it trhough dolphin it does not perserve permision so I instead did it from the terminal like this
sudo tar --exclude='.local/share/containers' --exclude='.local/share/Steam' --exclude='.local/share/chezmoi' --exclude='.local/share/trash' --exclude='.local/share/flatpak' --exclude='.local/share/winapps' -cvp --acls --selinux --xattrs --same-owner -f homefolder.tar AppImages/ bin/ CE-Tables/ Desktop/ homebrew/ .config/ .gnupg/ .themes/ .var/ .webcatalog/ .wine/ .local/share/ .local/state/ .local/rEFInd_GUI/ rEFInd_GUI/
sudo tar --exclude='.local/share/containers' --exclude='.local/share/Steam' --exclude='.local/share/chezmoi' --exclude='.local/share/trash' --exclude='.local/share/flatpak' --exclude='.local/share/winapps' -cvp --acls --selinux --xattrs --same-owner -f homefolder.tar AppImages/ bin/ CE-Tables/ Desktop/ homebrew/ .config/ .gnupg/ .themes/ .var/ .webcatalog/ .wine/ .local/share/ .local/state/ .local/rEFInd_GUI/ rEFInd_GUI/
and then extract with
sudo tar -xvp --acls --selinux --xattrs --same-owner -f homefolder.tar
sudo tar -xvp --acls --selinux --xattrs --same-owner -f homefolder.tar
hopfully that works had to use sudo to be able to tar the waydroid folder Hmm not sure why but there aree still some folders that my deck doesn't have access to such as Ryujinx . config folder Probably would be easier just to clone the disk from my main install to the decks SSD
asen23
asen232mo ago
permission is probably selinux?
Linus Xu
Linus Xu2mo ago
Or mismatched UIDs
zany130
zany1302mo ago
but then wouldnt i have issues with all my files not some? from what I can tell its only certain files in my .config folder that have issues for example the ~/.config/Ryujnix folder its owned by root for some reason after extracting it to my second system on the source system its owned by zany130 so no idea how it got owned by root
Linus Xu
Linus Xu2mo ago
.config/Ryujinx reports a perfectly normal 0755 deck:deck here… Does ls -nl report the same IDs?
zany130
zany1302mo ago
no it was owned by root with no read permisions for any other user. i dont rember the exact id because what I did was chown it to zany130:zany130 but the problem with that approach is that I have to manually find all the folders that where misowned i think only the .config folder was affected but i'm not sure .... if only there was a way to get the permission id of all folder under the home directory and the grep for root ownership ...
Linus Xu
Linus Xu2mo ago
A recursive chown on .config should be fine
zany130
zany1302mo ago
no yeah I got everything on .config owned by my user. but im not sure about the rest so far it all semms to have the correct permissions
Linus Xu
Linus Xu2mo ago
It should be simple to spin up some script that checks the permission for each file recursively under ~ ig
zany130
zany1302mo ago
thank you chatgpt !
find ~ -user root -exec ls -ld {} \;
find ~ -user root -exec ls -ld {} \;
this will list all files owned by root and give me detailed permision on them ideally though I would like to figure out why tar is changing the ownership of certain files to root in the first place... it shouldnt be doing that only certain .config files got owned by root. everything esles transfered with the corrrect permision execept the decky homebrew folder that should be owned by root and is owned by the user
Potajito
Potajito2mo ago
To migrate settings you can just use https://github.com/Prayag2/konsave
GitHub
GitHub - Prayag2/konsave: A command line program written in Python ...
A command line program written in Python to let you backup your dotfiles and switch to other ones in an instant. Works out-of-the box on KDE Plasma! - Prayag2/konsave
zany130
zany1302mo ago
I looked at that too it doesn't copy everything I need though. Besides that uses tar so it would probably have the same permission issues Turns out running tar without sudo does correctly transfer my . config files without root ownership Idk why though it only affects certain folders and not all Something strange is going on when it tries to tar those folders that it sees the sudo before the tar and taring the files as root
Solution
zany130
zany1302mo ago
perfect this worked flawlesly
tar --exclude='.local/share/polkit**' --exclude='.local/share/containers' --exclude='.local/share/Steam' --exclude='.local/share/chezmoi' --exclude='.local/share/waydroid' --exclude='.local/share/trash' --exclude='**waydroid**' --exclude='.local/share/flatpak' --exclude='.local/share/winapps' -cvp --acls --selinux --xattrs --same-owner -f homefolder.tar AppImages/ bin/ CE-Tables/ Desktop/ .config/ .gnupg/ .themes/ .var/ .webcatalog/ .wine/ .local/share/ .local/state/ .local/rEFInd_GUI/ rEFInd_GUI/ >> tar.log
tar --exclude='.local/share/polkit**' --exclude='.local/share/containers' --exclude='.local/share/Steam' --exclude='.local/share/chezmoi' --exclude='.local/share/waydroid' --exclude='.local/share/trash' --exclude='**waydroid**' --exclude='.local/share/flatpak' --exclude='.local/share/winapps' -cvp --acls --selinux --xattrs --same-owner -f homefolder.tar AppImages/ bin/ CE-Tables/ Desktop/ .config/ .gnupg/ .themes/ .var/ .webcatalog/ .wine/ .local/share/ .local/state/ .local/rEFInd_GUI/ rEFInd_GUI/ >> tar.log
sudo tar -cvp --acls --selinux --xattrs --same-owner -f homefolder-root.tar homebrew .local/share/waydroid .local/share/waydroid-settings.py/ .local/share/waydroid-settings/ .local/share/applications/ .local/share/polkit-1/ >> tarroot.log
sudo tar -cvp --acls --selinux --xattrs --same-owner -f homefolder-root.tar homebrew .local/share/waydroid .local/share/waydroid-settings.py/ .local/share/waydroid-settings/ .local/share/applications/ .local/share/polkit-1/ >> tarroot.log
then to extract
tar -xvp --acls --selinux --xattrs --same-owner -f homefolder.tar >> log.txt
tar -xvp --acls --selinux --xattrs --same-owner -f homefolder.tar >> log.txt
and
sudo tar -xvp --acls --selinux --xattrs --same-owner -f homefolder-root.tar >> log2.txt
sudo tar -xvp --acls --selinux --xattrs --same-owner -f homefolder-root.tar >> log2.txt
everything now has the correct owner
zany130
zany1302mo ago
still extremely confused why sudo tar only breaks permissions on SOME files and not all. sounds like a bug somewhere ....
Want results from more Discord servers?
Add your server