Steps for Simple Sysadmining
Notes on things I've learned.
Use rsync instead of cpI usually use
rsync -avW instead of
cp or
scp, especially when dealing with large trees.
Why?
- rsync will only copy changes.
- rsync will show you where in the copy process it is; add --progress for even more detail.
- if interrupted, you can re-run it and it will pick up where it left off.
Learn to love screen and do everything in it.When I am accessing, or at, a customer site, the first thing I do is to ssh to a computer on their network, launch
screen -ADR there, and do everything through that interface.
Why?
- I can run multiple sessions in one screen process. Think of it as "tabs" for console mode without the "tabs".
- I can start something running, disconnect, then reconnect to it later -- from somewhere else even.
- I've been bitten by bad wireless connections, bad VPN and internet connections, and XP/Vista weirdness. When the network barfs or Vista just takes a random dump on you (because it can), you can lose state if your commands are tied to the PuTTY on your desktop. By tying them to the screen session instead, your laptop can vanish or even blow up, while your sessions stay going.