Re: backup: automount and launch an script
On Tue, 03 Apr 2012 11:53:13 +0200, Alberto Fuentes wrote: > On 02/04/12 19:31, Camaleón wrote: >> That's what usually happens when "syncing" or "mirroring", each of the >> copies are keep the same but I think this can be customized, at least >> in Unison. Or maybe you need a backup/archive utility more than just a >> mere syncing approach. > > Im still building my solution. For the shake of completeness: > > unison is able to detect moved files and dont resend them. > > rsync has something that is not as good -y, --fuzzy >This option tells rsync that it should look for a basis > file for any destination file that is missing. The current algorithm > looks in the same directory as the destination file for either a file > that has an identical size and modified-time, or a similarly-named file. > If found, rsync uses the fuzzy basis file to try to speed up the > transfer. >Note that the use of the --delete option might get rid of > any potential fuzzy-match files, so either use --delete-after or > specify some filename exclusions if you need to prevent this. I forget about "rsnapshot" which can be also useful for your purpose. And here there's an article for backing up to external devices. Backups with rsnaphot to external USB drives http://workaround.org/rsnapshot-and-usb-drives As you are not going to run a daemonized version of the program, you could add a simple script from udev that runs "rsync/unison/rsnapshot/ whatever" which sends you an e-mail with a report once it finishes the copy routine by means of/using the included perl script ("rsnapreport.pl"). Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jlf3e5$8qv$8...@dough.gmane.org
Re: backup: automount and launch an script
On 02/04/12 19:31, Camaleón wrote: That's what usually happens when "syncing" or "mirroring", each of the copies are keep the same but I think this can be customized, at least in Unison. Or maybe you need a backup/archive utility more than just a mere syncing approach. Im still building my solution. For the shake of completeness: unison is able to detect moved files and dont resend them. rsync has something that is not as good -y, --fuzzy This option tells rsync that it should look for a basis file for any destination file that is missing. The current algorithm looks in the same directory as the destination file for either a file that has an identical size and modified-time, or a similarly-named file. If found, rsync uses the fuzzy basis file to try to speed up the transfer. Note that the use of the --delete option might get rid of any potential fuzzy-match files, so either use --delete-after or specify some filename exclusions if you need to prevent this. greets! aL -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f7ac889.2050...@qindel.com
Re: backup: automount and launch an script
On Mon, 02 Apr 2012 18:30:16 +0200, Alberto Fuentes wrote: > On 02/04/12 17:04, Camaleón wrote: (...) >>> also, if you know of some tool that is already able to perform all >>> these tasks, it would save me some troble :) >> >> Rsync? Unison? Self-made script? > > I was thinking about using rsync. Does unison have any advantage in 1 to > 1 syncs like the one i want to do? They both provide a different set of features. Maybe rsync is more suited to be run from command line while Unison (in addition to the command line) adds a GUI. > My idea is to have a external usb disk to avoid crashing/get lose > related with the machines that hold the data, but maybe is easier (and > as safe) if i just connect the disk (external or internally) to one of > the machines and issue rsyncs from there... via network. I accept advice > about this from people with experience regarding backups I would prefer that approach of using one computer as a central point where the client machines put their data and then sync from there to the external disk. > One of my concerns is if there is a way to detect that the same file > just moved. I mean, if i move a file to another folder, the rsync is > going to just erase it and move it from source again (AFAIK). Anyway to > avoid this pitfall? That's what usually happens when "syncing" or "mirroring", each of the copies are keep the same but I think this can be customized, at least in Unison. Or maybe you need a backup/archive utility more than just a mere syncing approach. >> There are also package divertions aimed to be used for backup/syncing >> purposes that may include what you want out-of-the-box. > > package divertions? what do you mean? any that come to mind? "Divertions" → "variations" in Camaleon's parlance :-P Packages that while using rsync are targeted to another purposes (backup) like "rdiff-backup" or "back in time". > Also im thinking about encrypt the backup disk if is going to be around > and somebody can just steal it... any recomendations for this? (i never > used encrypted file systems coz im afraid if something is corrupted, is > going to be harder to recover) If the external disk is going to be used exclusively for holding data, I would go here for a complete disk encryption solution using luks or encfs. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jlcnot$mab$1...@dough.gmane.org
Re: backup: automount and launch an script
On 02/04/12 17:04, Camaleón wrote: On Mon, 02 Apr 2012 13:14:11 +0200, Alberto Fuentes wrote: Im planning to have an external usb disk that i can plug to all my computers, and without interaction, sync all data i want with the disks. Also, umount at the end and send me and email with the details of the backup attempt. The only part im not sure is how to automount the disk and launch the script I bet you can use/write an udev rule to launch a script/program to be run when the automounter detects the device insertion. nice, udev rules is certainly what i was looking for :) also, if you know of some tool that is already able to perform all these tasks, it would save me some troble :) Rsync? Unison? Self-made script? I was thinking about using rsync. Does unison have any advantage in 1 to 1 syncs like the one i want to do? My idea is to have a external usb disk to avoid crashing/get lose related with the machines that hold the data, but maybe is easier (and as safe) if i just connect the disk (external or internally) to one of the machines and issue rsyncs from there... via network. I accept advice about this from people with experience regarding backups One of my concerns is if there is a way to detect that the same file just moved. I mean, if i move a file to another folder, the rsync is going to just erase it and move it from source again (AFAIK). Anyway to avoid this pitfall? There are also package divertions aimed to be used for backup/syncing purposes that may include what you want out-of-the-box. package divertions? what do you mean? any that come to mind? Also im thinking about encrypt the backup disk if is going to be around and somebody can just steal it... any recomendations for this? (i never used encrypted file systems coz im afraid if something is corrupted, is going to be harder to recover) Greetings, thanks! greets! aL -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f79d418.1000...@qindel.com
Re: backup: automount and launch an script
On Mon, 02 Apr 2012 13:14:11 +0200, Alberto Fuentes wrote: > Im planning to have an external usb disk that i can plug to all my > computers, and without interaction, sync all data i want with the disks. > Also, umount at the end and send me and email with the details of the > backup attempt. > > The only part im not sure is how to automount the disk and launch the > script I bet you can use/write an udev rule to launch a script/program to be run when the automounter detects the device insertion. > also, if you know of some tool that is already able to perform all these > tasks, it would save me some troble :) Rsync? Unison? Self-made script? There are also package divertions aimed to be used for backup/syncing purposes that may include what you want out-of-the-box. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jlcf65$mab$6...@dough.gmane.org
backup: automount and launch an script
Im planning to have an external usb disk that i can plug to all my computers, and without interaction, sync all data i want with the disks. Also, umount at the end and send me and email with the details of the backup attempt. The only part im not sure is how to automount the disk and launch the script also, if you know of some tool that is already able to perform all these tasks, it would save me some troble :) thanks! alberto -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f798a03.8010...@qindel.com