[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] regfile for redirect of My Documents



The profile directory is hidden....in Linux....but often shows in Windows.
 I had a user once start browsing in My Computer....saw the profiles
directory and decided it wasn't necessary....so they deleted some of
it....enough to corrupt the profile.  By having it in /opt/samba/profiles
(and that directory is NOT shared or at least not browesable) it doesn't
show up for the user...they don't know it's there and thus cannot delete
it.  With the exception of favorites....or maybe stuff they might save on
the Desktop....most of the important stuff will be in My Documents....and
thus saved wherever it is mapped to in /home.  I would try to leave it
with P:\My Documents for now....test it out this summer....if it doesn't
work....change it.  In fact, you can change at any time....even during the
school year simply by editing the startup.bat file in netlogon.   The next
time they login the new values will be used.

As for backing up?  I currently have a simple backup script that creates a
directory called "Win-backup" in the users /home dir....it then makes a
tarball of the users /opt/samba/profiles/username (aka the users profile
directory) and copies it to the Win-Backup directory...then I make a tar
file of the users entire /home directory and copy it to another server
mounted via NFS....making tar files allows me to preserve the
permissions....thus if I have to rebuild the server....so ling as the
usernames are the same....I can simply copy the tar file back and expand
it in place.  Works great as I've had to do it before.  Re-running the
user creation script again after you expand the tar file helps to make
sure all the perms are OK....may not be necessary, but I do it anyway.  I
have include my script below....it's pretty simplistic, but works very
well and very fast.  You can see I only backup the My Documents file,
Desktop, and Favorites....I don't care about the rest....if the server
goes down and I have to restore from backup...I just tell my users that
their Windows docs are now in the "win-backup" folder and they can go get
them from there.  My users are pretty savvy about that stuff now.

###############
!#/bin/bash
for x in `ls /home`; do
echo "Doing $x ..."
mkdir /home/${x}/win-backup
chown ${x}.Users /home/${x}/win-backup

echo "Copying /opt/samba/profiles/${x}/My\ Documents/
/home/${x}/win-backup"
/bin/cp -Rf  /opt/samba/profiles/${x}/My\ Documents/ /home/${x}/win-backup

echo "Copying /opt/samba/profiles/${x}/Desktop/ /home/${x}/win-backup"
/bin/cp -Rf /opt/samba/profiles/${x}/Desktop/ /home/${x}/win-backup

echo "Copying /opt/samba/profiles/${x}/Favorites/ /home/${x}/win-backup"
/bin/cp -Rf /opt/samba/profiles/${x}/Favorites/ /home/${x}/win-backup

chown -R ${x}.Users /home/${x}/win-backup

echo "Now let's archive everything for safe-keeping"
cd /home/${x}/win-backup
zip -r july4 *
#####################################################################
####This next line was to clear the backup directories initially#####
#####################################################################
#rm -Rf /mnt/backup/homebackup/home/${x}/dec12.zip
#####################################################################
cp -f july4.zip /mnt/backup/homebackup/home/${x}/
cd /home/${x}/
echo "Making an archive of all files in the home directory and backing
them up"
tar -czvf /mnt/backup/homebackup/home/${x}/july4.tgz --exclude july4.zip *
echo "Now we'll remove the zip file to save space"
cd /home/${x}/win-backup
rm -f july4.zip

done
######################

"Support list for opensource software in schools." <k12osn redhat com> on
Monday, July 4, 2005 at 9:25 PM +0000 wrote:
>It does run everytime, but seems to go very quickly. I'm sure a test
>could be
>written to make it happen only on the first login. One thing I have
>noticed,
>though, is that if a user already has a profile on the machine, the 
>changes the
>script makes don't take effect until they log out and log back in.
>However, if
>it is the first time the user has logged into a certain machine the
>changes
>happen immediately.
>
>I'm curious if the post that Heath made applies here? Should I instead
>use a
>path like \\server\%username%\My Documents to map that directory? Or is
>P:\My
>Doc sufficient?
>
>Also, we are putting the profiles and the home dir in /home/username on 
>the same
>server. I'm not sure what issues will come up, but I'm fairly confident
>the
>majority of users will just save their stuff in My Docs and be fairly 
>oblivious
>to the fact they can even access a P:\ in My Computer, thus most will 
>never even
>see the other stuff in their home drive (access from Linux may be the 
>exception
>here, I'm not sure exactly how that'll look).

David N. Trask
Technology Teacher/Coordinator
Vassalboro Community School
dtrask vcsvikings org
(207)923-3100


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]