Hello, I'm trying to determine if rsync is a sure method of backing up servers (Linux and Windows) whose files are constantly being accesed and are not able to be stoped they're services for backing up purposes... I would use it over ssh for making incremental backups... in my tests seem to always have worked backing up from a debian server to the copy server that runs debian too... I'm using the next : OPTS="--force --ignore-errors --delete --backup --backup-dir=/home/ramattack/pruebas-rsync/$BACKUPDIRMES/$dia -avz" rsync $OPTS $BDIR /home/ramattack/pruebas-rsync/$BACKUPDIRMES/imagen-copia BDIR is source I want to backup and /home/ramattack/pruebas-rsync....... is the destination... could this copy correctly opened files? Normally I will use it for backing up linux machines normally... and the backup server will be of course a linux machine (debian machine). but how does it behave with linux machines? P.D. I have googled and searched over there but all posts I've find are old... and I wanted to have a recent answer. Thanks a lot mates!!! __ Egoitz Aurrekoetxea Aurre e-Mail: egoitz.aurrekoetxea@nht-norwick.net NHT-Norwick? Avda. Txorierri 9, 104 48160 Derio (Vizcaya) Tel: +34 94 435 54 40 Fax: +34 94 423 38 44 Este mensaje va dirigido s?lo al destinatario del mismo y puede contener informaci?n privilegiada, de propiedad intelectual o cualquier otro tipo de datos de car?cter privado. Si lo ha recibido por error, notif?queselo inmediatamente al emisario y borre el original. Est? prohibido cualquier otro empleo de este e-mail por su parte. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
Hello, I'm trying to determine if rsync is a sure method of backing up servers (Linux and Windows) whose files are constantly being accesed and are not able to be stoped they're services for backing up purposes... I would use it over ssh for making incremental backups... in my tests seem to always have worked backing up from a debian server to the copy server that runs debian too... I'm using the next : OPTS="--force --ignore-errors --delete --backup --backup-dir=/home/ramattack/pruebas-rsync/$BACKUPDIRMES/$dia -avz" rsync $OPTS $BDIR /home/ramattack/pruebas-rsync/$BACKUPDIRMES/imagen-copia BDIR is source I want to backup and /home/ramattack/pruebas-rsync....... is the destination... could this copy correctly opened files? Normally I will use it for backing up linux machines normally... and the backup server will be of course a linux machine (debian machine). but how does it behave with linux machines? P.D. I have googled and searched over there but all posts I've find are old... and I wanted to have a recent answer. Thanks a lot mates!!!
The short answer is "It depends" Egoitz Aurrekoetxea wrote:> > Hello, > > I'm trying to determine if rsync is a sure method of backing > up servers (Linux and Windows) whose files are constantly > being accesed and are not able to be stoped they're services > for backing up purposes... I would use it over ssh for making > incremental backups... in my tests seem to always have worked > backing up from a debian server to the copy server that runs > debian too... I'm using the next : > > OPTS="--force --ignore-errors --delete --backup > --backup-dir=/home/ramattack/pruebas-rsync/$BACKUPDIRMES/$dia -avz" > > rsync $OPTS $BDIR > /home/ramattack/pruebas-rsync/$BACKUPDIRMES/imagen-copia > > BDIR is source I want to backup and > /home/ramattack/pruebas-rsync....... is the destination... > > could this copy correctly opened files? Normally I will use > it for backing up linux machines normally... and the backup > server will be of course a linux machine (debian machine). > but how does it behave with linux machines? > > P.D. I have googled and searched over there but all posts > I've find are old... and I wanted to have a recent answer. > > Thanks a lot mates!!! > __I can speak only of my own experience. The standard caveats apply. It depends and YMMV. Backing up live (and in-use) MySQL databases seems to work OK. The file being open is itself somewhat irrelevant. You can, with a bit of difficulty, do a backup of only closed files which is very unusable. Difficult, but not very. What matters is that the backup you copy is usable for your intended/needed purposes. Poor and buggy can be much much better than nothing. In my own case, it's really more a case of needing a "local" access to recent info from remote databases than backup per se. This means that if I do run into a problem, I just run another rsync and put things back consistent. Almost no problems, particularly where it matters. (even without CHECK TABLES). To further decrease the window of opportunity for mother nature to do its thing, I run back-to-back rsyncs to that the window when stuff is changing is quite small. Note: This style would NEVER be "recommended practice". This depends in large part on the nature of MyISAM database tables and the fact that on standard MySQL, readers and writers DO INTERFERE WITH EACH OTHER. (never thought that was an advantage, did you? ;-) This also depends on Unix (or Linux) file locking semantics. Basically, Unix file locks work only with other things that happen to use the same locking machinery. Anything can totally ignore what other things call locked. In particular, LOCK TABLES is ignored by rsync. Windows has different semantics. Very different. In particular, best I can tell, the directory entry is written with timestamp and file size. ... ... ... sometime later, the contents of the file might actually come dribbling in. I back up Samba home directories at 1:11 AM when reasonable users Should be home asleep. I play some fun&games with multiple backups at 2:22 and 3:33 (gotta love hard links --- as well as usable soft links) Assuming a short break in accessibility is tolerable, I'd 1) run rsync to the backup 2) stop the server 3) run rsync to the backup (should be much much faster now) 4) restart the server
>could this copy correctly opened files?it`s not a question if it`s open - it`s a question if you get a consistend copy. with this, there is nothing which makes sure that the files doesn`t change during transfer - so if it happens, on the target side you have a file different from the source. think of a big database file, gigabytes sized. now you start rsync. it starts and finds the file different from the backup copy, so it begins to transfer the changes to the target side. for example, after scanning 2gb of the files and transferring the diffs, the database process may change some blocks within the first 2gb, after that some blocks within the next 2gb rsync yet has to transfer. but rsync won`t see the changes within the first 2gb and continues reading to the end and transferring/syncing the rest but leaving the first 2gb "as is". so you may end up having a file in some really inconsistent/weird state!> -----Urspr?ngliche Nachricht----- > Von: "Egoitz Aurrekoetxea" <eaurrekoetxea@nht-norwick.net> > Gesendet: 26.09.07 04:03:22 > An: <rsync@lists.samba.org> > Betreff: Rsync and opened files> > > > Hello, > > I'm trying to determine if rsync is a sure method of backing up servers (Linux and Windows) whose files are constantly being accesed and are not able to be stoped they're services for backing up purposes... I would use it over ssh for making incremental backups... in my tests seem to always have worked backing up from a debian server to the copy server that runs debian too... I'm using the next : > > OPTS="--force --ignore-errors --delete --backup --backup-dir=/home/ramattack/pruebas-rsync/$BACKUPDIRMES/$dia -avz" > > rsync $OPTS $BDIR /home/ramattack/pruebas-rsync/$BACKUPDIRMES/imagen-copia > > BDIR is source I want to backup and /home/ramattack/pruebas-rsync....... is the destination... > > could this copy correctly opened files? Normally I will use it for backing up linux machines normally... and the backup server will be of course a linux machine (debian machine). but how does it behave with linux machines? > > P.D. I have googled and searched over there but all posts I've find are old... and I wanted to have a recent answer. > > Thanks a lot mates!!! > > > -- > To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html >__________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://produkte.web.de/club/?mc=021131
Thanks a lot for all you're answers mate all of them very useful... IMHO rsync will work quite nice with alomost all servers if you avoid backing up this way databases (they're dump utilities should be used instead... And later rsync the .sql files for example...). I think I'll set up all my servers from today and in the future over lvm and later rsync over lvm snapsphots... Well time to study how to do this :) lol... Thanks a lot mates have a nice day!!!! NHT-Norwick http://www.nht-norwick.com Powered by Blackberry Este mensaje va dirigido s?lo al destinatario del mismo y puede contener informaci?n privilegiada, de propiedad intelectual o cualquier otro tipo de datos de car?cter privado. Si lo ha recibido por error, notif?queselo inmediatamente al emisario y borre el original. Est? prohibido cualquier otro empleo de este e-mail por su parte. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. ----- Mensaje original ----- De: devzero@web.de <devzero@web.de> Para: Egoitz Aurrekoetxea; rsync@lists.samba.org <rsync@lists.samba.org> Enviado: Wed Sep 26 22:16:59 2007 Asunto: Re: Rsync and opened files>could this copy correctly opened files?it`s not a question if it`s open - it`s a question if you get a consistend copy. with this, there is nothing which makes sure that the files doesn`t change during transfer - so if it happens, on the target side you have a file different from the source. think of a big database file, gigabytes sized. now you start rsync. it starts and finds the file different from the backup copy, so it begins to transfer the changes to the target side. for example, after scanning 2gb of the files and transferring the diffs, the database process may change some blocks within the first 2gb, after that some blocks within the next 2gb rsync yet has to transfer. but rsync won`t see the changes within the first 2gb and continues reading to the end and transferring/syncing the rest but leaving the first 2gb "as is". so you may end up having a file in some really inconsistent/weird state!> -----Urspr?ngliche Nachricht----- > Von: "Egoitz Aurrekoetxea" <eaurrekoetxea@nht-norwick.net> > Gesendet: 26.09.07 04:03:22 > An: <rsync@lists.samba.org> > Betreff: Rsync and opened files> > > > Hello, > > I'm trying to determine if rsync is a sure method of backing up servers (Linux and Windows) whose files are constantly being accesed and are not able to be stoped they're services for backing up purposes... I would use it over ssh for making incremental backups... in my tests seem to always have worked backing up from a debian server to the copy server that runs debian too... I'm using the next : > > OPTS="--force --ignore-errors --delete --backup --backup-dir=/home/ramattack/pruebas-rsync/$BACKUPDIRMES/$dia -avz" > > rsync $OPTS $BDIR /home/ramattack/pruebas-rsync/$BACKUPDIRMES/imagen-copia > > BDIR is source I want to backup and /home/ramattack/pruebas-rsync....... is the destination... > > could this copy correctly opened files? Normally I will use it for backing up linux machines normally... and the backup server will be of course a linux machine (debian machine). but how does it behave with linux machines? > > P.D. I have googled and searched over there but all posts I've find are old... and I wanted to have a recent answer. > > Thanks a lot mates!!! > > > -- > To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html >__________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! Mehr Infos unter http://produkte.web.de/club/?mc=021131