Public feed #726082

Backup

public text v1 · immutable
Raw Edit
·published 2007-10-04 21:27 UTC
rendered paste body
#!/bin/bash

# En config guardas archivos como: wiki, blog, etc.
# dentro de un archivo, pones los archivos a salvar; por ej:
# cat blog
# /home/fede/http/blog

CONFIG=/etc/backup
DAY=`date '+%Y%m%d'`
DEST=/home/fede/backup

for f in `ls $CONFIG`; do
  tar czTf $CONFIG/$f $DEST/$f-$DAY.tar.gz
done