From owner-freebsd-questions@freebsd.org Thu Oct 1 13:17:26 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C2C34428265 for ; Thu, 1 Oct 2020 13:17:26 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C2DF16gc2z46FN for ; Thu, 1 Oct 2020 13:17:25 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm1-x335.google.com with SMTP id y15so3065816wmi.0 for ; Thu, 01 Oct 2020 06:17:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tfZQGDuzO8z0i9ZIdx3/j4aY2Hb7yowMPY2txr9/87U=; b=Qi1QbzLai3j5vlBlEhhSHrH6U6bEGBbKmIdmH+LPQIC1b/dEI+QrY/gQppKuhVLC/m F03wzJYsOH85mI1AamP2aRbVs3+D+D0TYnMY1JAGrjFa+F33lXyTN+lLZL4MhE9aMWkb c2bgagSRAXHGkg56lWnxxb0ErAUKRla8aVsG3y+1bgGni+RDabQr8oFJerYJoa9OXrEt 5TH3UxUBRcT5FNlZNwmFYflksylB43FnWvIYYUkp9mAvxTxOs7P8p4kX6mgPIfIab8Qq 7N/SdnGyFlUYQjzc3q9+tCFT4uSaPf/+IswgIznsgS68Zly0OGDecpdN1RMKAHMLBaSW skzQ== X-Gm-Message-State: AOAM531vChmPvJHMWP+gqg5zr//8+7yE697SMVceA1fKvhxIPbjNqSED 4MAiFvQP8MuD0czJ0jjlkt4UuTaQQB4= X-Google-Smtp-Source: ABdhPJxObn2in++zuU4GeD0RYnHWXzpiZO9zMJcgFV+/8jeaKMY277kKB1zvXmzqmfgDm9bxJXUF8g== X-Received: by 2002:a1c:6607:: with SMTP id a7mr8432576wmc.142.1601558244051; Thu, 01 Oct 2020 06:17:24 -0700 (PDT) Received: from gumby.homeunix.com ([90.195.199.9]) by smtp.gmail.com with ESMTPSA id x10sm2388103wmg.34.2020.10.01.06.17.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 06:17:23 -0700 (PDT) Date: Thu, 1 Oct 2020 14:17:21 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: Preserving target file's creation date Message-ID: <20201001141721.5be6318e@gumby.homeunix.com> In-Reply-To: <20201001134113.13ff6d86.freebsd@edvax.de> References: <202010010424.0914OZ9Y029194@sdf.org> <20201001072728.000004b6@seibercom.net> <20201001134113.13ff6d86.freebsd@edvax.de> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; amd64-portbld-freebsd12.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4C2DF16gc2z46FN X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.84 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[googlemail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[googlemail.com:+]; DMARC_POLICY_ALLOW(-0.50)[googlemail.com,quarantine]; RECEIVED_SPAMHAUS_PBL(0.00)[90.195.199.9:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[googlemail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.968]; R_DKIM_ALLOW(-0.20)[googlemail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.977]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_SHORT(0.11)[0.107]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::335:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 13:17:26 -0000 On Thu, 1 Oct 2020 13:41:13 +0200 Polytropon wrote: > So if you want to keep > all three timestamps identical, you'll have to combine both tasks. There are four timestamps: atime, mtime, ctime and btime. The first two are data access and modification. ctime is when the metadata in the inode was last modified, the 'c' is for changed, not created. btime is time the file/inode was created (b for birth), but it's not portable. I just had a look at some files I recently copied with dump|restore and it had preserved all 4 times. I also found: cp -p preserved atime, mtime and btime. rsync -a preserved mtime and btime I find the last two results strange as cp(1) and rsync(1) don't claim to preserve btime. I'd be surprised if rsync even knows about it.