Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshaiton <shaiton@fedoraproject.org>2011-05-29 13:48:56 (GMT)
committer shaiton <shaiton@fedoraproject.org>2011-05-29 13:48:56 (GMT)
commit72b08205cbf9f265169d1602e8a84e8a85dacff0 (patch)
tree26cbe1bc25be1154924dc15f2f6f003a2749ed46
parentde66fadf2f5f17083b5add10c410cb7b92c456c9 (diff)
do_backup] copying stdout and stderr to do_backup.log file
-rwxr-xr-xdo_backup.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/do_backup.sh b/do_backup.sh
index 6b3d507..5db9ca7 100755
--- a/do_backup.sh
+++ b/do_backup.sh
@@ -5,6 +5,12 @@ user_cfg=/home/olpc/.sugar/default/config
timestamp=`date +%s`
data=/home/olpc/.sugar/default/datastore/store
parsing_scr=jparser
+log=do_backup.log
+
+# copying stderr and stdout in a log file
+exec > >(tee -a $log)
+
+echo ---- Starting do_backup script: `date -d @$timestamp` ---- >> $log
if [ -n "$1" ]; then
data=$1
@@ -48,3 +54,5 @@ tar cjf $serial/${serial}.bz2 ${data} 2>/dev/null #&
#while `kill -0 $!`; do
#done
echo "The backup is in $serial"
+echo "" >> $log
+echo "" >> $log