Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
update [2010-11-10 10:38]
Joakim Forsgren
update [2010-11-10 11:16]
Joakim Forsgren
Line 10: Line 10:
 <code>rm -fr dokuwiki-2010-11-07* </code> <code>rm -fr dokuwiki-2010-11-07* </code>
  
 +Eller
 +<code bash>
 +#!/bin/bash
 +TIMESTAMP=`date +%Y-%m-%d-%H.%M`
 +if [[ -f "${1}.tgz" ]] ; then
 +  echo "Backup..."
 +  tar czf wiki_backup_${TIMESTAMP}.tgz dokuwiki/ 
 +  echo "Extract..."
 +  tar xzf ${1}.tgz
 +  echo "Copy..."
 +  cp -fr ${1}/* dokuwiki/.
 +  echo "Clean up..."
 +  rm -fr ${1}*  
 +else
 +  echo "No file named: ${1}.tgz"
 +fi
 +</code>