[GRLUG] Hosting ideas

Michael Mol mikemol at gmail.com
Sun Mar 23 21:09:33 EDT 2008


On Sun, Mar 23, 2008 at 8:55 PM, Steve Romanow <slestak989 at gmail.com> wrote:
> Michael Mol wrote:
>  > On Sat, Mar 22, 2008 at 6:08 PM, Douglas Peter Sculley
>  > <dsculley at gmail.com> wrote:
>  >
>  >> "nice" processes where applicable in your script:
>  >>
>  >> $ nice -n 19 command
>  >>
>  >> If rsync is available on both ends you can use rsync with a bandwidth limit
>  >> over ssh:
>  >>
>  >> $ rsync -av -e ssh --bwlimit=10 foo:src/bar/ /data/tmp
>  >>
>  >
>  > Nice.
>  >
>  > My local backup script was essentially
>  >
>  > ssh user at domain mysqldump -h "$DBHOST" -u "$DBUSER"
>  > "--password=$DBPASS" "$DBNAME" |gzip > "$DAILYS/db/$(date +%Y%m%d).gz"
>  > rsync -r user at domain:public_html/rosettacode.org "$RCDAILYS/site"
>  >
>  >
>  Michael,
>
>  What part of this is expensive?  What about waiting until you get it
>  down to your backup server to compress it?  It will take more time, but
>  if it allows the system to not error out, may work.
>  Just a thought.

Actually, the script I posted runs on my home desktop machine.  SSH
pipes mysqldump's STDOUT to its own STDOUT on my local machine.  gzip
thus runs locally at my home.  Just the same, mysqldump on the host
machine consumes too much CPU when dumping a 130MB database.

I still haven't tried tying throttle.pl into the process.  If I
throttle too much, I may wind up with a backed up image of a database
in an inconsistent state.  If I throttle too little, I run up against
my account's CPU quota.  Runnning nice also raises the specter of an
inconsistent database.  MW can be locked down for maintenance, mode,
though.  It's conceivable I could have the script lock it down for the
duration.

-- 
:wq


More information about the grlug mailing list