Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
update [2010-11-10 10:38] Joakim Forsgren |
update [2022-07-18 13:20] (current) |
||
---|---|---|---|
Line 10: | Line 10: | ||
< | < | ||
+ | Eller | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | TIMESTAMP=`date +%Y-%m-%d-%H.%M` | ||
+ | if [[ -f " | ||
+ | echo " | ||
+ | tar czf wiki_backup_${TIMESTAMP}.tgz dokuwiki/ | ||
+ | echo " | ||
+ | tar xzf ${1}.tgz | ||
+ | echo " | ||
+ | cp -fr ${1}/* dokuwiki/. | ||
+ | echo "Clean up..." | ||
+ | rm -fr ${1}* | ||
+ | else | ||
+ | echo "No file named: ${1}.tgz" | ||
+ | fi | ||
+ | </ |