Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Creazione unità backup..
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Doktoreas
n00b
n00b


Joined: 13 Feb 2005
Posts: 15

PostPosted: Fri Jun 10, 2005 7:13 pm    Post subject: Creazione unità backup.. Reply with quote

Salve a tutti.
In casa ho il pc con linux che si occupa di dividere la connessione su 2 altri pc dove gira win...
Ho la necessità di fare backup ogni tot ore di cartelle presenti in questi 2 pc e perciò mi chiedevo se fosse possibile che:

1)Linux ogni 4 ore controlla certe cartelle di win
2)Se sono presenti cambiamenti ai file (di cui ha creato in precedenza un archivio), aggiorna tale archivio
3)A fine serata (alle 23:00 per esempio) esegue un backup su cd di questo archivio

Il primo passo è far vedere queste cartelle a gentoo (e ci lavorerò domani..), ma per le altre che consigli potete darmi?

Grazie mille

:D
_________________
...I am fixing a hole in the ocean....
Back to top
View user's profile Send private message
wolf3d
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2003
Posts: 101
Location: Nibelheim

PostPosted: Fri Jun 10, 2005 7:33 pm    Post subject: Reply with quote

al lavoro ho avuto una necessità simile.. tipo connettermi periodicamente e downloadare/uploadare via ftp

ho fatto insieme a un collega uno scriptino in bash con utilizzo di smbmount, ncftp cp mv e rm il tutto gestito da cron.. grezzo ma funziona ed è quello che ci serve :wink:

ma non so cosa cerchi tu...
_________________
The Brave Do Not Fear The Grave
Back to top
View user's profile Send private message
Doktoreas
n00b
n00b


Joined: 13 Feb 2005
Posts: 15

PostPosted: Fri Jun 10, 2005 8:02 pm    Post subject: Reply with quote

Potrei dargli un occhiata? :wink:
_________________
...I am fixing a hole in the ocean....
Back to top
View user's profile Send private message
funkoolow
Guru
Guru


Joined: 21 Sep 2004
Posts: 545
Location: er paese delle anguille

PostPosted: Fri Jun 10, 2005 9:56 pm    Post subject: Reply with quote

in effetti postarlo non sarebbe male, io al momento risolvo sempre manualmente...
_________________
SabaziaLUG: il LUG a nord di Roma
Back to top
View user's profile Send private message
wolf3d
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2003
Posts: 101
Location: Nibelheim

PostPosted: Sun Jun 12, 2005 10:49 am    Post subject: Reply with quote

dunque lo script non ce l'ho qui ma è facilmente riproducibile con una cosa del genere:

attenzione: quello che posto sarà sicuramente buggato

nota: non so come fare il controllo delle date con cp per evitare di copiare i file uguali, sicuramente ci sarà qualcosa nelle man pages

nano -w script.sh
Code:

#!/bin/bash
# buggy script, no warranty provided

# parametri pc1
# indirizzo + cartella di share
pc1="//192.168.1.2/cartella_condivisa_su_pc1"
# autenticazione windows
auth1="-o username=wolf,password=miapassword_pc1"

# parametri pc2
# indirizzo + cartella di share
pc1="//192.168.1.100/cartella_condivisa_su_pc2"
# autenticazione windows
auth2="-o username=wolf,password=miapassword_pc2"

# directory locali dove montare le share windows
target1="/home/wolf/samba/pc1/"
target2="/home/wolf/samba/pc2/"

# funzioni per montare tramite samba
monta_pc1 () {
    smbmount $pc1 $target1 $auth1
}

monta_pc2 () {
    smbmount $pc2 $target2 $auth2
}

# monto i 2 pc windows
monta_pc1
monta_pc2

# copio i file

###################
#missing code
###################

# finita la copia smonto i samba
smbumount $target1
smbumount $target2


ecco ora attendo solo critiche :P (e magari qualche consiglio su come fare la copia dei file^^)
_________________
The Brave Do Not Fear The Grave
Back to top
View user's profile Send private message
xchris
Advocate
Advocate


Joined: 10 Jul 2003
Posts: 2824

PostPosted: Sun Jun 12, 2005 11:41 am    Post subject: Reply with quote

vi butto un idea..

montate uno share di Winsoze in /mnt/cacata
predisponete una dir per la copia in /mnt/copia_cacata (ad es)

utilizzate

Code:

rsync -va --delete-after /mnt/cacata  /mnt/copia_cacata


chiedo scusa per i nomi..ma parlando di windows mi viene spontaneo. :)

In questo modo avrete una copia sincronizzata.(e trasferirà dati solo se necessario)
ciao
_________________
while True:Gentoo()
Back to top
View user's profile Send private message
fat_penguin
Apprentice
Apprentice


Joined: 25 Jul 2004
Posts: 294
Location: sud side of Switzerland

PostPosted: Mon Jun 13, 2005 9:29 am    Post subject: Reply with quote

Ciao,
io da diverso tempo uso:
Code:
* net-misc/unison
     Available versions:  2.9.1-r1 ~2.10.2 ~2.12.2
     Installed:           2.9.1-r1
     Homepage:            http://www.cis.upenn.edu/~bcpierce/unison/
     Description:         Two-way cross-platform file synchronizer


è molto comodo per la sincronizzazione dei file... magari ti serve per la prima parte di quello che vuoi fare...

byebye
fat_penguin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum