From owner-freebsd-stable@FreeBSD.ORG Wed Jun 20 13:54:33 2007 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA9F416A41F for ; Wed, 20 Jun 2007 13:54:33 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 26D9413C43E for ; Wed, 20 Jun 2007 13:54:32 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (czgzuv@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l5KDsQKr022665; Wed, 20 Jun 2007 15:54:31 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l5KDsPtl022664; Wed, 20 Jun 2007 15:54:25 +0200 (CEST) (envelope-from olli) Date: Wed, 20 Jun 2007 15:54:25 +0200 (CEST) Message-Id: <200706201354.l5KDsPtl022664@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, matrix@itlegion.ru In-Reply-To: <003801c7b05c$cac2c3b0$0c00a8c0@Artem> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 20 Jun 2007 15:54:31 +0200 (CEST) Cc: Subject: Re: When inode change time changes? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, matrix@itlegion.ru List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 13:54:33 -0000 Artem Kuchin wrote: > I use gtar (gtar because it has incremental > backups, and tar does not) You _can_ use BSD tar for incremental backups. I do that every day. When you do a level-0 backup, simply "touch" a flag file somewhere. Then when you do the level-1 backup, use the --newer-than option with that flag file, so only files that were modified after the level-0 backup get archived. The --newer-than option checks the ctime. If you want to look at the mtime only (i.e. ignoring renames, chmod, chown etc.), use --newer-mtime-than instead. Please refer to the tar(1) manpage for details. > I use inode change time in order to backup > all changed files. I have notices that some > files are always backed up even if they did not > change. For example all mysql database. > I checked their file change time and it is not > changed, howeever, inode change time changes > on every mysql restart. > > Maybe someone can englighten me when > inode change time changes? What must be done > with file to change it (except writing to it)? > I tried chmoding - it does not affect inode time. The mtime changes upon every data write to the file, the ctime additionally changes upon every change of the inode data (i.e. file meta data). This is documented in the stat(2) manpage: st_ctime Time when file status was last changed (inode data modification). Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), utimes(2) and write(2) system calls. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.'