Hello Community I'm new to OpenBSD, I want to write a script for backup and monitoring changes all files on the disk. Shell: ksh Utilities: dump, restore Input data: /etc/fstab ,/etc/dumpdates Output data: backup files, text file - filenames with changes Output dist: scsi disk for backup file, mail for text file What do you think will be the most elegant solution for this problem? With best regards from Russia. Axl Melkhov.
I use restore -t on the dump just created to get the listing of backed up files. I'm not sure just what your question is though - what you want seems clear enough, you just need to write the script now. paulm
How about looking at rsync.... Thats what we use and it will list out changes. I used to cron it each night and have it email the output... -- J.D. Bronson
rsync is great, and there's a few utils that uses it such as rdiff-backup. On the other hand, if the number of machines you're backing up and restoring is a bit larger, I've developed a fondness for bacula myself. Not directly relevant to the OP's immediate problem, but it's a very nice system, and you can configure it to send you pretty much any level of info you want to see on what it does. - Peter -- Peter N. M. Hansteen, member of the first RFC 1149 implementation team http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/ "Remember to set the evil bit on all malicious network traffic" delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
I know you want to write your own script, but take a look at rsnapshot [1]. I've been using it for a while to backup my systems at home and it's been delightful. Just a small program based on rsync that handles backups in a nice simple, more space efficient, and automated way. [1] http://rsnapshot.org/ -- Samuel Baldwin - logik.li
Monitoring changes: OpenBSD checks every day the system and generate a diff e.g. of the /etc folder and send an email to the root account. You can forward this email to your account if you want. Changes in the system will backuped in /var/backups by default. Backup your System (backup of big systems is not easy): dump and restore are a possible solution. I use bacula, an distributed backup tool. It can be a little bit complex for one pc system.
2nd the recommendation for rsnapshot. Simple solution to many problems (including backing up files with root privledges) that are tricky with rsync, as the rsnapshot machine is logging into the machine you're backing rsnapshot will also keep as many versions as you configure, .. e.g. seven days, four weeks, six months, .. Lee
