## IDENTIFY WHERE LARGE FILES WILL BE KEPT & CHOWN to rsaporta ls -alh /data/ ## where files will be kept ls -alhR /data/ ## where files will be kept sudo chown -R rsaporta:rusers /data/ ## SETUP PASSWD IF NOT ALREADy # sudo passwd rsaporta ## MAKE SURE USER IS RSAPORTA su rsaporta ## IF NOT ALREADY ## CREATE SSH KEY AND UPLOAD TO GITHUB #-create-# ssh-keygen -b 4096 -C "comment" -t rsa #-copy-# cat ~/.ssh/id_rsa.pub ## COPY THE KEY TO github ## -- online ## ## VERIFY CONNECTION IS GOOD ssh -T git@github.com ## CONFIGURE git config --global user.name "Rick Saporta [RBox Amzn 201501]" git config --global user.email "rsaporta@theorchard.com" ## SETUP GIT git clone git@github.com:theorchard/datascience.git ## FOR ORCHARD ## ---------------------------- ## Create dir where the large files will go mkdir /data/orch_large mkdir /data/orch_large/ImageSaves mkdir /data/orch_large/data ## Create dir where the main files will go mkdir ~/git mkdir ~/git/orch ## Point the symlinks ## ln -s ORIG FAKE ln -s /data/orch_large/data ~/git/orch/data ln -s /data/orch_large/ImageSaves ~/git/orch/ImageSaves ### Link to bash profile mv ~/.bashrc ~/.bashrc_old ln -s ~rsaporta/git/RBoxScripts/RBOX.bashrc ~/.bashrc ## CONFIRM ls -lh ~/git/orch ls -lh ~/git/orch | grep ' -' ## START COPYING ## ---------------------------- ## COPY .bashrc scp -r root@10.100.2.194:~rsaporta/.bashrc ~rsaporta/.bashrc ## ImageSaves [ORCHARD] scp -r root@10.100.2.194:~rsaporta/gitData/orch/ImageSaves/* /data/orch_large/ImageSaves/ ## PASSWORD NEEDED ## ImageSaves [ORCHARD] scp -r root@10.100.2.194:~rsaporta/gitData/orch/data/* /data/orch_large/data/ ## PASSWORD NEEDED ## TODO: IF THERE IS ANYTHING IN YOUR HOME DIRECTORY OR ELSEWHERE, BRING IT OVER # -- none for now -- # ## RSYNC THE REST ## Option -H (attempts to) preserve hard links. (This is why we first scp the data and ImageSaves directories) ## EG: ## rsync -a -H --exclude=a/c myserver:/a [dest] ## rsync -a -H --exclude=middle_dir/NOT_THIS_FOLDER --exclude=middle_dir/NOT_ME_EITHER --exclude=not_this_file.txt root@10.100.2.194:/root/git/orch/TESTING_20150123 ~/git/orch/TEST2/ ## bring ~rsaporta/git ~~> ~rsaporta/git ## exlcuding ~rsaporta/git/orch/data ## exlcuding ~rsaporta/git/orch/ImageSaves rsync -aHv --exclude=orch/data --exclude=orch/ImageSaves root@10.100.2.194:~rsaporta/git/ ~rsaporta/git "WARNING -- HERE IS THE ISSUE WITH MISSING SLASH -- if final slash is missing in the 'path/to/from/dir/' 'dir' will be copied as well ie: it will put the files into ./git into ~rsaporta/git/git" ## WRONG: rsync -aHv --exclude=orch/data --exclude=orch/ImageSaves root@10.100.2.194:~rsaporta/git ~rsaporta/git ls -alh ~rsaporta/git ls -alh ~rsaporta/git/orch ## CREATE LINKS FOR .Rprofile ## use same RProfile for root user sudo ln -s ~rsaporta/git/misc/rscripts/RickysRprofile.R ~root/.Rprofile ln -s ~rsaporta/git/misc/rscripts/RickysRprofile.R ~rsaporta/.Rprofile sudo chown rsaporta:rusers ~rsaporta/.Rprofile ## IF other users are on the box, ie rstudio or revor # ln -s ~rsaporta/git/misc/rscripts/RickysRprofile.R ~rstudio/.Rprofile # chown rstudio:RUsers ~rstudio/.Rprofile # # ln -s ~rsaporta/git/misc/rscripts/RickysRprofile.R ~revor/.Rprofile # chown revor:RUsers ~revor/.Rprofile