Veja este script:

#inicio do script de backup
#!/bin/bash
DATE="$(date  +%d-%m-%Y)"
DATE2="$(date  +%F)"
mkdir /u02/tmp/bkp-${DATE}
cd /u02/tmp/bkp-${DATE}
#Backup do SYS, Deptos e Publico
tar czf sys-${DATE}.tgz         /u02/sys/  \
--exclude .recycle/*   --after-date=${DATE2}
#Backup dos Arquivos dos usuários
tar czf usr-${DATE}.tgz         /home/rede/usuarios/  \
--exclude .recycle/*   --after-date=${DATE2}
#Backup do Banco de Dados
tar czf cnx-${DATE}.tgz       \
 /home/rede/conexos/backup_oracle/conexos.dmp
cd ..
#Copia para a maquina que tem gravador de CD
smbmount file://admin/bkp /mnt/bkp -o username=raquel,password=quel2002
cp /u02/tmp/bkp-${DATE}/* /mnt/bkp/
smbumount /mnt/bkp/
rm -rf /u02/tmp/*

Note o Parametro "--after-date=" no tar, acho que é isto que vc quer.

Diorgenes Mello
ICQ:45102992
Mensager: [EMAIL PROTECTED]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Pablo Lorenzzoni" <[EMAIL PROTECTED]>
Cc: <debian-user-portuguese@lists.debian.org>
Sent: Monday, July 14, 2003 4:35 PM
Subject: Re: Backup incremental



Sérgio,
Acho bom você dar uma boa lida na página man do tar. "man tar". Ou na
página info. "info tar".



Olah!

Eh! Vc tah confuso mesmo.

primeiro backup:
tar cvf /mnt/backup/sergio.tar /home/sergio/Sergio

Incrementais:
tar uvf /mnt/backup/sergio.tar /home/sergio/Sergio

[]s

Pablo

Em Sáb 12 Jul 2003 15:18, Sergio escreveu:
| Como faco para executar um backup incremental usando o TAR?
|
| Por exemplo, quero salvar periodicamente o meu /home/sergio/Sergio em
| /mnt/backup (/dev/hdg1).
|
| Ja'tentei
|
| $ tar cvf sergio.tar /home/sergio/Sergio -C /mnt/backup
|
| Mas ele cria o sergio.tar dentro do diretorio corrente.
|
| Estou confuso na sintaxe do comando.
<snip>
--
Pablo Lorenzzoni (Spectra) <[EMAIL PROTECTED]>
GnuPG: 0x268A084D at pgp.mit.edu/keyring.debian.org
This message is protected by DoubleROT13 encryption
Attempting to decode it violates the DMCA/WIPO acts


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]







--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 04/07/03


Responder a