]> mj.ucw.cz Git - moe.git/blob - bin/mo-backup
Oops, there was some crap in the patch.
[moe.git] / bin / mo-backup
1 #!/bin/sh
2 if [ -z "$1" ] ; then
3         D=back/`date '+%H%M'`
4 else
5         D=$1
6 fi
7 mkdir -p $D
8 for m in mo1{00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16} mo2{00,01,02,03,04,05,06,07,08,10,11,12,13,14,15,16} ; do
9         echo -n "$m: "
10         mkdir $p $D/$m
11         pushd $D/$m >/dev/null
12         ssh root@$m 'cd /aux/mo/users ; tar czf - .' | tar xzf -
13         popd >/dev/null
14         du -s $D/$m | cut -f 1
15 done