Help
José Luis Poza
pozaj at tb-solutions.com
Fri Nov 12 08:10:14 GMT 2004
Hello,
At first Thanks to Bob and Joe for his help!
I´ll test that parameters this week-end.
I like all the parametes you have told me except --delete because the
complete backup may has files that a user deleted by error...
Then my actual script is:
----------------------------------------------------------------------------
------------------------------------------------------
function New_inc_name_folder(){
var d,s="hist";
d = new Date();
s += d.getDate() + "-";
s += (d.getMonth() + 1) + "-";
s += d.getYear()+ "-";
s += d.getHours();
s += d.getMinutes();
s += d.getSeconds();
return(s);
}
function execute(serv_dest,param,und,rec_serv){
var WshShell = WScript.CreateObject("WScript.Shell");
var ident_folder=New_inc_name_folder();
WshShell.run("cmd /c "+ und +" & cd\\ & cd rsync & cd "+ serv_dest +" & cd
"+ rec_serv +"_hist & md " + ident_folder,0,true);
WshShell.run("cmd /c "+ und +" & /cwrsync/rsync "+param+"
--backup-dir=/rsync/" + serv_dest+ "/"+rec_serv+"_hist/" +ident_folder+"
"+serv_dest+"::"+rec_serv+" /rsync/" + serv_dest+ "/"+rec_serv+
" >
"+und+"\\rsync\\"+serv_dest+"\\"+rec_serv+"_log\\"+ident_folder+".log",0,tru
e);
}
var excludeunix=" --exclude \"media\" --exclude \"mnt\" --exclude \"tmp\"
--exclude \"dev\" --exclude \"devices\" --exclude \"proc\" ";
var excludefs01=" --exclude \"SHARED/Desarrollo/VSS/\" ";
// ------------------------------PARAMETROS
CONFIGURABLES----------------------------------
var param= "-av --stats --recursive --backup --update --times
--ignore-errors --temp-dir=/cygdrive/c/temp";
var und="f:"; //Letra de la unidad dónde se encuentra el ejecutable del
comando rsync.
//
----------------------------------------------------------------------------
--------------------
//zaz-prod-fs01 (FILE SERVER)
execute("zaz-prod-fs01",param,und,"unitc");
execute("zaz-prod-fs01",param,und,"unitd");
execute("zaz-prod-fs01",param+excludefs01,und,"unitf");
//zaz-pub-mx01 (LINUX WWW)
execute("zaz-pub-mx01",param,und,"unitc");
----------------------------------------------------------------------------
------------------------------------------------------
That script is write in jscript of windows script host. (save as .js
extension, my file is called LAUNCHER.js)
The structure files should be the next to this configuration take effect.
C:\
rsycn
zaz-prod-fs01
unitc
unitc_log
unitc_hist
unitd
unitd_log
unitd_hist
unitf
unitf_log
unitf_hist
zaz-pub-ww01
raiz
raiz_log
raiz_hist
_log suffix folders are for logs files and _hist suffix folders are for
incremental copies.
I have 2 scripts more for incremental and logs folders maintenance and for
e-mails alerts with results of copies.
That´s all, thank you
Good Bye
José Luis Poza
-----Mensaje original-----
De: rsync-bounces+pozaj=tb-solutions.com at lists.samba.org
[mailto:rsync-bounces+pozaj=tb-solutions.com at lists.samba.org] En nombre de
jgd42-rsync at yahoo.com
Enviado el: jueves, 11 de noviembre de 2004 22:38
Para: rsync at lists.samba.org
Asunto: Re: Help
--- Bob Bob wrote:
<snip>
> One issue I have is I'd like to preverve the last weeks worth of
> deleted data on my backup server "just in case" someone needs it.
I use the following options to accomplish that:
--backup --backup-dir=/backup.$yesterday where $yesterday is a env var set
using `date` like so (for bash):
yesterday=`date -d yesterday +%Y%m%d`
Then on the server I delete all backup.$eightdaysago directories via a cron
job.
HTH,
Joe
--
To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list