Re: Conf File Backup Idea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/01/2009 04:58 AM, Tony Nelson wrote:
On 09-07-31 19:17:46, Thom Paine wrote:
Thanks for the suggestions. I'll have a look at some of them and see
if I can figure something out.

I don't mind manually making lists of files as I start working with
them. What really prompted this was that I have some home automation
working really well on an old server I had. One power outtage that
lasted longer than 30 minutes while I was away from home, two hard
drives in the array went offline. I thought the whole server was lost
and last night I dusted it off and rooted around in the adaptec
interface and was able to force them both back online and bring the
array back up. I quickly copied off my heyu files but I got to
thinking if there was a way to automatically rsync files somewhere
when I edit them, it would make things simpler on a server I have no
need to completely back up, yet have some good info on it.

I'm a sloppy person, so I set up an rsync-based solution derived from a
script I snagged through googling.  It keeps 4-hourly, daily, 4 weekly,
and several monthly rotating backups of the directories I list.  Let me
know if you want it.  Sometime I'll clean it up some more and put it on
my web site.


Something that we do to get most of the configuration files backed up is:

# Create list of RPM config files that have changed
> files_rpmconfig
rpm -qac --dump  | sed -e "/^(/d" | while read -a line
do
#	echo "Line: ${line[0]} ${line[3]}"
	if false
	then
		if [ ! -r ${line[0]} ]
		then
			echo "Unable to access file: ${line[0]}"
		fi
	fi
	if [ -f ${line[0]} ]
	then
		fi=(`md5sum ${line[0]}`)
#		echo "Sum: ${fi[0]}"
		if [ ${fi[0]} != ${line[3]} ]
		then
			echo "${line[0]}" >> files_rpmconfig
		fi
	fi
done

This should backup any files that are marked as configuration files in the RPM packages and have changed. If you has installed tarballs etc, you will obviously
have to add any configuration files for those manually. We normally do this
during OS updates so we can quickly look back at configuration changes without
having to go and get the full backup disk.

Cheers


Terry

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux