hi: I am using RHEL7. when I upgrade samba AD from 4.1 to 4.2, I migrate from self compiled to sernet package, so I move files manually from /usr/local/samba/var to /var/lib/samba and /var/cache/samba. now I want to upgrade to 4.3, this time I need to migrate from sernet package to self compiled (unlucky me). and I found this time move files back to /usr/local/samba/var is harder, since I need to know which file belongs to which directory. I know some content of the directories can be auto-recreated, so I don' t need to preserve them. but I want to make sure: /usr/local/samba/var/cache -> will it auto recreate and I can skip files in it? /usr/local/samba/var/lock -> will it auto recreate and I can skip files in it? /usr/local/samba/var/locks -> I think this is critical and I need to move files belongs here correctly? /usr/local/samba/var/run -> I am not sure about this directory. should I move any files back to it? thanks a lot!! Regards, tbskyd
Hello, Am 09.11.2015 um 10:16 schrieb d tbsky:> when I upgrade samba AD from 4.1 to 4.2, I migrate from self compiled to > sernet package, so I move files manually from /usr/local/samba/var to > /var/lib/samba and /var/cache/samba. > > now I want to upgrade to 4.3, this time I need to migrate from sernet > package to self compiled (unlucky me). and I found this time move files > back to /usr/local/samba/var is harder, since I need to know which file > belongs to which directory. I know some content of the directories can be > auto-recreated, so I don' t need to preserve them. but I want to make sure: > > /usr/local/samba/var/cache -> will it auto recreate and I can skip files in > it? > /usr/local/samba/var/lock -> will it auto recreate and I can skip files in > it? > /usr/local/samba/var/locks -> I think this is critical and I need to move > files belongs here correctly? > /usr/local/samba/var/run -> I am not sure about this directory. should I > move any files back to it?When you compile Samba, you can use the various ./configure options, to set the paths to the same like SerNet uses. This prevents that you forgot to to move something. Or, if you use BIND9_DLZ that there are hard links in private/dns/sam.ldb.d/ that may get lost during copy what leads into two separate database files instead of one. Check out https://wiki.samba.org/index.php/Build_Samba_from_source There are some examples for setting paths during ./configure. If you want to know the locations for the folders on your current installation, see the last section of the guide. Regards, Marc
Am 10.11.2015 um 06:04 schrieb d tbsky:> the problem is that sernet <-> self compiled path is not 1:1 > mapping. sernet use only two directories under "var" , but self > compiled use many under "var" by default.Yes. That's why I recommended that you use the same ./configure options like SerNet does, then your installation uses exactly the same directories. Someone at SerNet also just downloaded the sources, and run ./configure with these options :-)> so I need to know which > file belongs to which directory. I already finish the compare and > moving. I got some of them wrong but luckily samba auto re-create > them and it seems all the critical files are not missing. > I am still curious about my previous question: > > can I safely delete files at /usr/local/samba/var/lock and let > samba recreate them? how about other directories under var? I ask > this many times but didn't get answer..A short try in my test environment showed: If the subdirectories are not there, they are not created and so not populated. If they exist, not every tdb is created (some may be created when first used - i don't know). Also e. g. the lib/winbindd_privileged/pipe wasn't created, etc. I would not drop that directories content. Move everything or - what I recommend, configure your self compiled version, to use the same locations than SerNet does. Regards, Marc