Amiberry and SMB backup (symlinks)
-
Long time ago, I used to have this weird problem where, during a backup to my PC via SMB, the PC would periodically pop up a window about some files needing administrator permission, interrupting the transfer until I responded, and then, no matter whether I clicked "continue" or "skip," the files would not be copied either way.
Tracked it down to when a symlink points to a location outside the network share. I had a small handful of these, and all of them were of my own fault...until now. When I started playing with Commodore Amiga and Amiberry.
Some of the files in
/opt/retropie/configs/amiga/amiberry/whdboot/save-data/Kickstarts
are symlinks back to/opt/retropie/emulators/amiberry/kickstarts
. This itself is another link back tohome/pi/RetroPie/BIOS/amiga
which is within the network share, but that doesn't seem to matter because: when I copyconfigs
to my PC, it gets to these files and interrupts the transfer until I click through, just like before.It's okay that the files aren't copied (again, they're only symlinks and as they are created automatically, they can be created again by running
configure
I presume; or maybe the emulator itself, I've not yet worked out where they actually come from) but I'd rather it didn't interrupt the transfer halfway through every time.Does anyone else experienced this, or anyone have a solutions? Supposing the links need to stay where they are and point to where they point to, maybe something with "wide links" in SMB config or something?
-
I think the symlinks in
$configdir/amiga/amiberry/whdboot/save-data/Kickstarts
are created byamiberry
when it scans for Kickstarts the$biosdir/amiga
(via the symlink) and not by the setupconfigure
script.That's inherited from Amiberry's old behavior or looking for Kickstarts/other resource files under the installation folder instead of using a separate (per-user) configuration folder.
This may have changed in the 4.x series, but haven't investigated yet. What problem are you exactly trying to solve - an unattended backup script/copying of the
config
share ? -
@mitu said in Amiberry and SMB backup (symlinks):
What problem are you exactly trying to solve - an unattended backup script/copying of the
config
share ?Exactly that. Occasionally I make a backup just by copying the folders over SMB to a location on my PC. This takes a good long while so I usually just click and drag to start the copy and then go to bed or leave the house for a while. But then when I come back, instead of being done it's just stalled there and waiting for my action before it will continue.
-
There are
smb.conf
options to follow symlinks outside the shared directory tree. If you trust everyone on your LAN you could edit your/etc/samba/smb.conf
:[global] ; unix extensions = yes ; default is yes allow insecure wide links = yes ; <--- set this [configs] ; follow symlinks = yes ; default is yes wide links = yes ; <--- and this
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#UNIXEXTENSIONS
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#ALLOWINSECUREWIDELINKS
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#FOLLOWSYMLINKS
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#WIDELINKS -
@Lolonois said in Amiberry and SMB backup (symlinks):
There are
smb.conf
options to follow symlinks outside the shared directory tree. If you trust everyone on your LAN you could edit your/etc/samba/smb.conf
:Thanks. I think I had tried this before, but maybe I didn't have them in the right
[global]/[configs]
headings. In any case it's working now.I understand there's a security risk here. I still wonder if there's a more elegant solution, or this is a compromise that will remain necessary in order to use this chosen backup method.
-
You could just get rid of the symlink-ed Kickstarts and keep them as files in the whdboot/save-data/Kickstarts folder. Amiberry should still work and the files would be backed-up like regular files.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.