Re: how do i scp .dotfiles??
On Tue, Aug 31, 2010 at 02:48:28PM +0100, krad wrote: On 30 August 2010 20:02, Chris Rees utis...@gmail.com wrote: On 30 August 2010 18:37, krad kra...@googlemail.com wrote: On 27 August 2010 20:13, Polytropon free...@edvax.de wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) or sudo tar cf - /somepath | ssh x...@y sudo tar xvf - -C somepath I agree with other posts though rsync is the easiest Why sudo with tar? Chris make sure all perms correct and can read all files Just to make =sure= about this: can using tar/gtar as root [or sudo] make sure that all the permissions are correct? It =may= save me keystrokes, :_) gary ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
Gary Kline kl...@thought.org writes: Just to make =sure= about this: can using tar/gtar as root [or sudo] make sure that all the permissions are correct? It =may= save me keystrokes, :_) Permissions, yes. If you want flags, you'll need the base system tar. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 30 August 2010 20:02, Chris Rees utis...@gmail.com wrote: On 30 August 2010 18:37, krad kra...@googlemail.com wrote: On 27 August 2010 20:13, Polytropon free...@edvax.de wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) or sudo tar cf - /somepath | ssh x...@y sudo tar xvf - -C somepath I agree with other posts though rsync is the easiest Why sudo with tar? Chris make sure all perms correct and can read all files ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 27 August 2010 20:13, Polytropon free...@edvax.de wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org or sudo tar cf - /somepath | ssh x...@y sudo tar xvf - -C somepath I agree with other posts though rsync is the easiest ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 27 August 2010 19:15, Gary Kline kl...@thought.org wrote: On Fri, Aug 27, 2010 at 10:54:52AM -0700, Jason wrote: On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber glen.j.bar...@gmail.com wrote: On 8/27/10 1:07 PM, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, scp u...@foo:\.dotfile .dotfile Regards, Use rsync over ssh. i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == there are no \ dot files not .directories] i want EVERYTHING from this desktop, tao, temp on ethic. thanks You can just use rsync in cooperation with find command. I've used it before, but found this as an example with a web search. rsync -avR remote:'`find /home -name *.[ch]`' /tmp/ Just reverse the order. this may be close. use the unix tools and glue them together:-) i have this, cobbled together from a prev script: echo rsync with checksum from directory [${PWD}] to [kl...@ethic:${EPWD}]; rsync --perms --times --update --compress --verbose \ --checksum -e ssh -i /home/kline/.ssh/tao_nopasswd-id \ ${PWD} kl...@ethic:${EPWD}; if [ $? = 0 ] then echo rsync transfer went okay, tao to ethic|mail kl...@thought.org else echo rsync failed to ethic from /home/kline|mail kl...@thought.org fi exit; but this fails .. any clues?? -jgh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org rsync is probably trying to chown files to ownerships it cant. The best way I have found to do this and keep things fairly secure it to run an rsync server on the source machine but bind it to loopback. Then tunnel the the server over ssh when you go into the box. This allows things to run relatively safely as root. eg ssh -R 873:127.0.0.1:873 host sudo rsync -aP --numeric-ids 127.0.0.1::HOME/ /home/ if you just want certain user dirs then add some include and exclude flags eg --include=/home/kline -- include=/home/kline/** --exclude=/home/** ordering is important here. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 30 August 2010 18:37, krad kra...@googlemail.com wrote: On 27 August 2010 20:13, Polytropon free...@edvax.de wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) or sudo tar cf - /somepath | ssh x...@y sudo tar xvf - -C somepath I agree with other posts though rsync is the easiest Why sudo with tar? Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Sat, 28 Aug 2010 18:05:31 -0700, 'Gary Kline' kl...@thought.org wrote: at least for me, gtar fails to pick up dotfiles. rsynx copies =everything=, and it looks like the test rsync script i posted last night was working all along. it was So fast that i assumed it was bombing entirely. i will 2-ck a few more files before i am sure. a question to the list is how can i copy ALL of /home to my new server? If it is the 1st copy, I'd suggest using dump + restore. This of course will only work if your /home is a separate partition on both systems. Partition size doesn't matter as long as the size of the target partition is at least the size of the used data on the source partition. You basically umount /home and then use # dump -Lauf0 home.dump /dev/ad0s1f to obtain the data; you can also use - instead of the actual file home.dump to pipe the data directly to a transfer via scp. On the target machine, # cd /home # restore -rf /where/is/home.dump You can connect both commands with ssh so you can directly dump + restore from machine A to machine B, given that SSH is possible. It then would be something like this: # dump -0Lauf - /dev/ad0s1f | ssh 10.0.0.10 cd /home cat | restore -rf - In this example, 10.0.0.10 is the IP of the target machine, and you're issuing the command from the source machine, with /home unmounted. Note that dump requires the DEVICE NAME of the device where /home is mounted on, and restore will put everything into the CURRENT DIRECTORY. The source device must NOT be mounted, but the target directory must be mounted and accessible. You CAN, however, leave /home mounted, and dump will create a snapshot that identifies /home as at the starting point in time; changes during backup won't be reflected in the target. It CAN be possible get inconsistencies during creation of the snapshot if there's heavy activity on /home, so it's usually the safe way to umount /home before reading from the device file. This method makes sure you will get ALL files with their exact properties (permissions, flags, dates). See 18.2.1 here: http://www.freebsd.org/doc/en/books/handbook/backup-basics.html For any further synchronisation, I would go with rsync. There is also another interesting tool in ports: It is called cpdup. It can also be used for synchronisation, and it has the interesting feature (can be configured of course) that it won't delete files in the target that have been deleted in source since the last run. In this case, your target data will always grow, and if you acciden- tally deleted something, it will sill be there. and to you, matthew, does --delete rm out of date files or directories? The --delete parameter will have rsync delete files on the target that are NOT part of the source files, but only relative to the subtree you are transfering. E. g. on your target machine you already have src/foo.tex src/bar.tex src/meow.c from last time you synchronized, and you have the files src/foo.tex src/bar.tex as never versions in the source, and you also deleted meow.c here because you don't need it anymore. Now if you rsync the src/ dir to the target machine, --delete will remove meow.c from the target, and rsync will of course update foo.tex and bar.tex. The --delete makes sure that the copy is of 1:1 kind, instead of incremental. what about ?VS, given that i have virtually everything under [CR]VS control? slightly offtopic is that i accidently rm'd a file on tao one morning after a few minutes work. a copy was safely croned to ethic. A good suggestion. I did use cvsup (from ports) in the past for revision control and idiotproof storage for most stuff that I created. It is very helpful, not just for recovering accidentally deleted files, but also for progress check and rewinding changes. It's a great tool for keeping configuration files also. Backing it up gives you a versioned, ordered, one-tree consistent file collection. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
'Gary == 'Gary Kline' kl...@thought.org writes: 'Gary at least for me, gtar fails to pick up dotfiles. How did you invoke it? There's a big difference between: cd $HOME gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Sun, Aug 29, 2010 at 07:06:33AM -0700, Randal L. Schwartz wrote: 'Gary == 'Gary Kline' kl...@thought.org writes: 'Garyat least for me, gtar fails to pick up dotfiles. How did you invoke it? There's a big difference between: cd $HOME gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? Sure. my default is the asterisk. ...Anyway, i used matthew's -r for recursion [with rsync] and even tested --delete on some junk ~kline/.4kde/* stuff. then slowly, got rid of more junk [[unused for =years=]] directories and files. pretty soon i'll be ready to save everything from here [tao/present/oldtao] to ethic. then i'll move everything to the newtao. then i'll give away my '03 tower. do unto others... or whatever:) gary PS: thanks for the tip, randal! i may have that somewhere in some obscure ~/.notesfile. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
'Gary == 'Gary Kline' kl...@thought.org writes: There's a big difference between: cd $HOME gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? 'Gary Sure. my default is the asterisk. Well, there's your problem. Sometimes, you have to actually think about what you're doing. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Sun, 29 Aug 2010 12:12:11 -0700, mer...@stonehenge.com (Randal L. Schwartz) wrote: 'Gary == 'Gary Kline' kl...@thought.org writes: There's a big difference between: cd $HOME gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? 'GarySure. my default is the asterisk. Well, there's your problem. Sometimes, you have to actually think about what you're doing. :) The problem (i. e. a convention) is that .* is not part of *, which includes everything else, even nothing, and the form *.* (that looks like the DOS equivalent of all files) does seem to omit .*; the spaced form * .* would work as it contains * (which does not contain .*) and .* (not in *). :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Sun, Aug 29, 2010 at 12:12:11PM -0700, Randal L. Schwartz wrote: 'Gary == 'Gary Kline' kl...@thought.org writes: There's a big difference between: cd $HOME gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? 'GarySure. my default is the asterisk. Well, there's your problem. Sometimes, you have to actually think about what you're doing. :) LOL! man, when i get into hackery mode--especially playing at being a system admin-- i just go into autopilot. well, live and learn. this stuff has been a good reminder. hope it helps a few others listmembers. (FWIW,I actually did find the dot vs asterisk note in a old howto file. i dont know if i ought to fess up, but i am.) here's another fwiw before i really launch: it pays to do a du from $HOME every few [n] months. i'm finding so much unused crud, e.g. ~/.wine from 2004, that my drive is going to weigh a few pounds less... -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Sun, Aug 29, 2010 at 09:34:59PM +0200, Polytropon wrote: On Sun, 29 Aug 2010 12:12:11 -0700, mer...@stonehenge.com (Randal L. Schwartz) wrote: 'Gary == 'Gary Kline' kl...@thought.org writes: There's a big difference between: cd $HOME gtar cfz /tmp/xx.tgz . # should get everything and cd $HOME gtar cfz /tmp/xx.tgz * # will miss all the dotfiles Did you do the latter, by chance? 'Gary Sure. my default is the asterisk. Well, there's your problem. Sometimes, you have to actually think about what you're doing. :) The problem (i. e. a convention) is that .* is not part of *, which includes everything else, even nothing, and the form *.* (that looks like the DOS equivalent of all files) does seem to omit .*; the spaced form * .* would work as it contains * (which does not contain .*) and .* (not in *). :-) ouvh, ouch, ouch!1 running away, pulling out my one remaining hair:) ...and now, no mo' mail until, oh, around 02:15 -g -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Sunday 29 August 2010, Polytropon wrote: The problem (i. e. a convention) is that .* is not part of *, which includes everything else, even nothing, and the form *.* (that looks like the DOS equivalent of all files) does seem to omit .*; the spaced form * .* would work as it contains * (which does not contain .*) and .* (not in *). :-) The problem with using .* as a wildcard for hidden files is that it will include .. which is almost certainly not what you want. For example rm -r .* can be disastrous. A safer wildcard for hidden dotfiles and everything else could be .[^.]* * -- Mike Clarke ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using find to collect a tarball may work. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 28 August 2010 08:02, Gary Kline kl...@thought.org wrote: On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using find to collect a tarball may work. How about: $ tar cjf - *dotfile* | ssh machine 'tar xvjf -' Much less fiddly! Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 28/08/2010 08:02:31, 'Gary Kline' wrote: On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using find to collect a tarball may work. I've been reading this thread, and I'm somewhat at a loss as to why you need to rename all of the dotfiles at all, Gary. Dotfiles are just ordinary files, and programs like find(1), scp(1) or tar(1) will handle them just like any other file. The only difference is that shells by default don't include dotfiles in some glob expansions and ls(1) doesn't include them in directory listings. Of course, either of the above can be overridden: 'echo * .*' or 'ls -a' will show all files including dotfiles. The one slightly tricky thing about dealing with dotfiles is the presence of '..' -- the standard link to the directory above the current one. If you accidentally include that in a list of directories to recurse through, then you'll end up affecting a bunch of stuff that maybe you didn't expect. So long as you are aware of the possibility it's pretty easy to avoid this problem. To make a copy of your home directory on tao to a temporary directory on ethic, personally I'd use rsync(1) [in ports as net/rsync]. Then you can just do: % rsync -avx --delete ~/ ethic:/home/kline/ It will default to running over ssh(1), so you need to make sure you can ssh from tao to ethic before you begin. The neat thing is that you run that command repeatedly, and each subsequent time it will copy only what has changed on tao over to ethic. I see someone has given instructions for setting up anonymous rsync -- that's another possibility, but probably a bit OTT for this particular job. Anonymous rsync is probably best thought of as a superior replacement for anonymous FTP. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: how do i scp .dotfiles??
On Sat, Aug 28, 2010 at 11:29:29AM +0100, Matthew Seaman wrote: On 28/08/2010 08:02:31, 'Gary Kline' wrote: On Fri, Aug 27, 2010 at 09:13:06PM +0200, Polytropon wrote: On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) If i'm going to rename, say, ~/.Plans to ~/Plans and ~/.HowtoI18 to ~/HowtoI18, I may just scp -rp every ~/[.] file. the idea of using find to collect a tarball may work. I've been reading this thread, and I'm somewhat at a loss as to why you need to rename all of the dotfiles at all, Gary. Dotfiles are just ordinary files, and programs like find(1), scp(1) or tar(1) will handle them just like any other file. The only difference is that shells by default don't include dotfiles in some glob expansions and ls(1) doesn't include them in directory listings. Of course, either of the above can be overridden: 'echo * .*' or 'ls -a' will show all files including dotfiles. The one slightly tricky thing about dealing with dotfiles is the presence of '..' -- the standard link to the directory above the current one. If you accidentally include that in a list of directories to recurse through, then you'll end up affecting a bunch of stuff that maybe you didn't expect. So long as you are aware of the possibility it's pretty easy to avoid this problem. To make a copy of your home directory on tao to a temporary directory on ethic, personally I'd use rsync(1) [in ports as net/rsync]. Then you can just do: % rsync -avx --delete ~/ ethic:/home/kline/ It will default to running over ssh(1), so you need to make sure you can ssh from tao to ethic before you begin. The neat thing is that you run that command repeatedly, and each subsequent time it will copy only what has changed on tao over to ethic. I see someone has given instructions for setting up anonymous rsync -- that's another possibility, but probably a bit OTT for this particular job. Anonymous rsync is probably best thought of as a superior replacement for anonymous FTP. Cheers, Matthew at least for me, gtar fails to pick up dotfiles. rsynx copies =everything=, and it looks like the test rsync script i posted last night was working all along. it was So fast that i assumed it was bombing entirely. i will 2-ck a few more files before i am sure. a question to the list is how can i copy ALL of /home to my new server? and to you, matthew, does --delete rm out of date files or directories? what about ?VS, given that i have virtually everything under [CR]VS control? slightly offtopic is that i accidently rm'd a file on tao one morning after a few minutes work. a copy was safely croned to ethic. (yes, i needed mmore coffee, but i was giving thanks to zeus that hours of research and writing were safe!) gary -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
how do i scp .dotfiles??
guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 8/27/10 1:07 PM, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, scp u...@foo:\.dotfile .dotfile Regards, -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: how do i scp .dotfiles??
Rename them, copy, then rename them back? -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Gary Kline Sent: Friday, August 27, 2010 12:08 PM To: FreeBSD Mailing List Subject: how do i scp .dotfiles?? guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org font size=1 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in' /div This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system. /font ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. scp -r to recursively copy directories? That should get everything in each directory. We tend to use rsync for this, making an initial copy to get the majority of the files transferred before making the final cut over, the ``rsync --delete ...'' to bring things up to date before making the final switch. When switching to a new mail server we have done this live with about 10,000 users, but when we did this, we left the Maildir stores empty before the final rsync and didn't use --delete on the Maildir directories. This allowed new mail to be processed as it came in, and the older mail wouldn't conflict as the Maildir message file names should be unique. Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 Rights is a fictional abstraction. No one has ``Rights'', neither machines nor flesh-and-blood. Persons... have opportunities, not rights, which they use or do not use. -- Lazarus Long ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber glen.j.bar...@gmail.com wrote: On 8/27/10 1:07 PM, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, scp u...@foo:\.dotfile .dotfile Regards, Use rsync over ssh. -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:29:14AM -0700, Bill Campbell wrote: On Fri, Aug 27, 2010, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. scp -r to recursively copy directories? That should get everything in each directory. We tend to use rsync for this, making an initial copy to get the majority of the files transferred before making the final cut over, the ``rsync --delete ...'' to bring things up to date before making the final switch. When switching to a new mail server we have done this live with about 10,000 users, but when we did this, we left the Maildir stores empty before the final rsync and didn't use --delete on the Maildir directories. This allowed new mail to be processed as it came in, and the older mail wouldn't conflict as the Maildir message file names should be unique. Bill -- So what would the rsync line be starting from ~kline and pointing at ethiv? ethic is my temporary savings machine while i install the newtao, m y new desktop. gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber glen.j.bar...@gmail.com wrote: On 8/27/10 1:07 PM, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, scp u...@foo:\.dotfile .dotfile Regards, Use rsync over ssh. i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == there are no \ dot files not .directories] i want EVERYTHING from this desktop, tao, temp on ethic. thanks -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber glen.j.bar...@gmail.com wrote: On 8/27/10 1:07 PM, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, scp u...@foo:\.dotfile .dotfile Regards, Use rsync over ssh. i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == there are no \ dot files not .directories] i want EVERYTHING from this desktop, tao, temp on ethic. thanks You can just use rsync in cooperation with find command. I've used it before, but found this as an example with a web search. rsync -avR remote:'`find /home -name *.[ch]`' /tmp/ Just reverse the order. -jgh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On 8/27/10 1:51 PM, Gary Kline wrote: i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == there are no \ dot files not .directories] i want EVERYTHING from this desktop, tao, temp on ethic. thanks An alternative I use sometimes when there is ample disk space on the source machine is to create a big tar file of everything in the user's home directory, scp the tar file, and then extract into the new home directory on the destination machine. Personally I find that slightly easier to keep track of. There are many ways to skin this cat -- --Jon Radel j...@radel.com
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010 at 10:54:52AM -0700, Jason wrote: On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: On Fri, 27 Aug 2010 13:19:40 -0400 Glen Barber glen.j.bar...@gmail.com wrote: On 8/27/10 1:07 PM, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. tx, scp u...@foo:\.dotfile .dotfile Regards, Use rsync over ssh. i've already done 98 or so straight scp copies. the thing is how to use rsync over to an empty ethic? [[ empty == there are no \ dot files not .directories] i want EVERYTHING from this desktop, tao, temp on ethic. thanks You can just use rsync in cooperation with find command. I've used it before, but found this as an example with a web search. rsync -avR remote:'`find /home -name *.[ch]`' /tmp/ Just reverse the order. this may be close. use the unix tools and glue them together:-) i have this, cobbled together from a prev script: echo rsync with checksum from directory [${PWD}] to [kl...@ethic:${EPWD}]; rsync --perms --times --update --compress --verbose \ --checksum -e ssh -i /home/kline/.ssh/tao_nopasswd-id \ ${PWD} kl...@ethic:${EPWD}; if [ $? = 0 ] then echo rsync transfer went okay, tao to ethic|mail kl...@thought.org else echo rsync failed to ethic from /home/kline|mail kl...@thought.org fi exit; but this fails .. any clues?? -jgh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, Aug 27, 2010, Gary Kline wrote: On Fri, Aug 27, 2010 at 10:29:14AM -0700, Bill Campbell wrote: On Fri, Aug 27, 2010, Gary Kline wrote: guys, this is the start of my master switchover. how to i copy/scp,say, ~/.purpur to home/kline/.purple? along with many hundreds of other dot files? scp doesn't do it. scp -r to recursively copy directories? That should get everything in each directory. We tend to use rsync for this, making an initial copy to get the majority of the files transferred before making the final cut over, the ``rsync --delete ...'' to bring things up to date before making the final switch. When switching to a new mail server we have done this live with about 10,000 users, but when we did this, we left the Maildir stores empty before the final rsync and didn't use --delete on the Maildir directories. This allowed new mail to be processed as it came in, and the older mail wouldn't conflict as the Maildir message file names should be unique. So what would the rsync line be starting from ~kline and pointing at ethiv? ethic is my temporary savings machine while i install the newtao, m y new desktop. Assuming that ~kline is /home/kline and will go to /home/kline on the remote machine this would work (decoding the options is left as an exersize for the student :-). cd /home rsync -vaHrP kline othermachine:/home A more general solution that doesn't require ssh, but connects to the rsync daemon on the remote machine might be to create a module definition in the destination machine's /etc/rsyncd.conf file something like this: [myhome] uid = myusername gid = mygroupname read only = false use chroot = true path = /path/to/myhomedirectory comment = /path/to/myhomedirectory hosts allow = sourceipaddress hosts deny = * Then the rsync command could be: rsync -vaHrP ~/kline/ othermachine::myhome/ This has a couple of advantages. First the destination uid:gid can be different on the destination machine as rsync uses the names in the group and passwd database. Assuming you're on a LAN where ssh security isn't critical using the daemon/module approach doesn't require ssh authorized_keys, and can be restricted to one or more IP addresses or CIDR blocks. We use this when moving between systems where the uid:gid mapping is different when moving between machines of differing OS releases (e.g. SuSE Linux to FreeBSD), or where the destination machine may have existing users with conflicting uid:gid s Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 ... because most politicians and bureaucrats are technological idiots, it's going to be crucial for the rank and file members of the IT community to find its collective voice soon. --Michael Vizard, InfoWorld Editor in Chief. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how do i scp .dotfiles??
On Fri, 27 Aug 2010 12:21:12 -0500, Gary Gatten ggat...@waddell.com wrote: Rename them, copy, then rename them back? Not good for a whole bunch of files; in this case: tar them together, transfer the archive, untar it; rename afterwards if needed. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org