From owner-freebsd-questions@freebsd.org Thu Dec 6 18:28:44 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B047B130E4C5 for ; Thu, 6 Dec 2018 18:28:44 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from dnvrco-cmomta01.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F9377982F for ; Thu, 6 Dec 2018 18:28:43 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [192.168.0.9] ([70.121.63.82]) by cmsmtp with ESMTPA id UyO0gps46P088UyO4g8pJd; Thu, 06 Dec 2018 18:28:36 +0000 Date: Thu, 06 Dec 2018 12:28:32 -0600 From: Paul Schmehl Reply-To: Paul Schmehl To: Polytropon cc: FreeBSD Questions Subject: Re: Advice on backups Message-ID: In-Reply-To: <20181206025602.8843eb11.freebsd@edvax.de> References: <20181206025602.8843eb11.freebsd@edvax.de> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-CMAE-Envelope: MS4wfGSPVJec+2PFpNpvMQ1FdRSIYPo0g5S7kpw0Hkboiq2gRlMDRDphrP+r0qWGhm6aPk+c2WoYqRpbmliO0UnsVuy2XhhaOT04c5WjXjCFXTtm2pOyI2o4 0Pu/Ixob2eRJQES/+KWhS6BuPp6g63pB21TkRGRUBeGg+rHGhNNilxmrcTdaRkQ2zkVsBl34I7t6IwAy59xmK+i1fDwHimdgETQHhRiPva/t5lXjbe5ClLKd X-Rspamd-Queue-Id: 0F9377982F X-Spamd-Result: default: False [-4.54 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[pschmehl_lists@tx.rr.com]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:107.14.73.0/24]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[rr.com]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: dnvrco-cmedge01.email.rr.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[230.73.14.107.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; IP_SCORE(-1.24)[ipnet: 107.14.73.0/24(-3.40), asn: 7843(-2.72), country: US(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:7843, ipnet:107.14.73.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2018 18:28:44 -0000 --On December 6, 2018 at 2:56:02 AM +0100 Polytropon wrote: > On Wed, 05 Dec 2018 16:29:28 -0600, Paul Schmehl wrote: >> So, I setup some scripts to create gzipped tarballs and transfer those >> to my Dropbox account. (I have plenty of space there.) I run the >> scripts daily, and the files are named with the date of the backup >> (e.g. 120518.websites.tgz) >> [...] >> I've also created a backup directory in my home directory where I put >> copies of all the scripts I run, plus a text file of crontab and a few >> other things. I then zipped that and copied it to Dropbox as well. I >> don't have a script for it, because those things don't change that >> often. > > A little suggestion that originates from ye olden times > when CVS was common: > > Create a repository for your configuration files, use > directory structures and "common" for the individual > hosts. Keep track of changes you might appy. Make > backups of the CVS directory tree, typically as a > (compressed) tarball. With this method, you can > quickly access any host's configuration from any > (revision) date you need, and CVS commit messages > might help you find what you need, e. g., the reason > why you changed something. And if you deleted your > working copy accidentally, it's no problem to check > out a new instance from the CVS repository. > > Today, people of course use Subversion or probably > Git, on GitHub... ;-) > > > >> Am I missing anything important? I tested untarring one of the tarballs >> into my home directory, and if I understand it correctly, I would need >> to untar these in / if I ever need to restore anything. > > Make sure tar archives restore _all_ file and directory > properties as they are present in the source. The advantage > of a tar archive is that you can also obtain _selected_ > parts from the archive, if you don't need the whole one. > > For an exact 1:1 copy of filesystem content, I still > suggest using dump + restore. Those can also be used > comfortably via SSH. It is neccessary to pay attention > to dumping from live filesystems, i. e, those which are > in a r/w state (and not r/o or unmounted). See "man dump" > and "man restore" for details. :-) Thanks for your suggestions. I use CVS on all conf files, so those are captured in the tarballs since they reside under the conf directories. I'll take a look at dump and restore. One concern I have is that I'm creating the backups on the system, so use of space during the process is a consideration. Paul Schmehl, Retired As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell