From owner-freebsd-questions@freebsd.org Thu Dec 6 01:56:16 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 57847132F61C for ; Thu, 6 Dec 2018 01:56:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0300D75700 for ; Thu, 6 Dec 2018 01:56:14 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.252.129]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1MCKJw-1ge6oY1V2o-009P9U; Thu, 06 Dec 2018 02:56:04 +0100 Date: Thu, 6 Dec 2018 02:56:02 +0100 From: Polytropon To: Paul Schmehl Cc: FreeBSD Questions Subject: Re: Advice on backups Message-Id: <20181206025602.8843eb11.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:wKXeriuNZ+gIVHdGfIojIwYqFJ+WLBY8ighlObggiy46QvAXdU3 3B8D0SOdqd5oCIFFc13pFWs5zi6tqjYHwlP6Cne96Gpm9o/pSPqdbE/PMOzd//7Mo7OwMy/ W5SrAE1xhmmmNC6Q7EgwwL8ZMey4FxSt5uOHa7xoHnTHWRI4gCu7WJYSBrGxLzecdAG/zHq dVatsVyO7VRwdOvQhEqlg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:C6LYQklUslE=:7yeogA09DOwYTlpo4h/j6U bMaG3VTq16kqjrGSuKR6isC4+XecYJrUewT2v9cgNGEEsBiMxoBrlThdKnJsbCqzKs0NS35qV GPEYftzEcoi/IvJcUuxFPKmB/hBC1KgfIPmZMy7Z65HsYrto4ReaAe+Y/AQKff743oSGaj3Ug canwtPWU9ki83BGoqQVcceXvzYWnR+LGvPsF6lw0Aqj+5kjSZVYGOs5Tk57dG8UzzEvAzcIrl rWkTBjNH9YcV+613BG5HDKsSjbXu2Txr+ePhp6WrwIbieNTJHjp1AjeUCXM3tldKCpqXdZ6S9 Z4VgM69O2bZORvXhxo5FG7Kb67slSwWFjXQBtryDluULAyZ3f9d7H/d0uslAcX2fjDMOwlhyR MdDK/iFbu/j4FHIdCJZCsUTi816aMnxAkyZXHz2pFLhW9ePv5WIMTLw0K28YSFRa4Juz7VNv1 45fZkrvJDDhf+CtBIPuRbFozfbmrsGflFQTvNqadoF7Nj7u1qncZoJYQHWuZdmqjMx902wtda Ol8UPe4zm20Li1eyHmNrQNo0ejrQoFgj/1dFa5qIo+bF/OruFIxnpEoQFmq2DLMw9ocI+UorI 1INx6+Py9SzRA+ifHw3MQWbHzkYexQLXKcJxMXO9EFxvwFsrHGn4Y2+eN2997KgmrDCLNTZcf XX504rfpA/Bj31hSodx7GcT4NmeL3Zg3M2bC7NMkaXkkwN59Js6lgVQAL0tK2QRo6Npk2PXcU xxdJCZ5BUixLaQIiTE/E4MULIm09ZypBhMCGjuXiLIKYbNvouWS5IULCRuI= X-Rspamd-Queue-Id: 0300D75700 X-Spamd-Result: default: False [-0.28 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx01.schlund.de,mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.57)[-0.575,0]; RECEIVED_SPAMHAUS_PBL(0.00)[129.252.193.92.zen.spamhaus.org : 127.0.0.10]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; IP_SCORE(-0.13)[ipnet: 212.227.0.0/16(-0.58), asn: 8560(-0.05), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.987,0]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.977,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[13.17.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; 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 01:56:16 -0000 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...