From owner-freebsd-questions@freebsd.org Fri Jun 12 00:01:20 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 6E4B8345A9E for ; Fri, 12 Jun 2020 00:01:20 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 49jgqg0mrNz4bjw for ; Fri, 12 Jun 2020 00:01:18 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: by segfault.tristatelogic.com (Postfix, from userid 1237) id 40DC64E751; Thu, 11 Jun 2020 17:01:17 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-questions@freebsd.org Subject: Makin' backups -- questions MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <86751.1591920076.1@segfault.tristatelogic.com> Date: Thu, 11 Jun 2020 17:01:17 -0700 Message-ID: <86752.1591920077@segfault.tristatelogic.com> X-Rspamd-Queue-Id: 49jgqg0mrNz4bjw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rfg@tristatelogic.com designates 69.62.255.118 as permitted sender) smtp.mailfrom=rfg@tristatelogic.com X-Spamd-Result: default: False [-1.52 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.49)[-0.487]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[tristatelogic.com]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.58)[-0.582]; NEURAL_HAM_SHORT(-0.16)[-0.155]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14051, ipnet:69.62.128.0/17, country:US] 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: Fri, 12 Jun 2020 00:01:20 -0000 I'm re-writing my backup scripts and could use a bit of advice. I make routine full but "incremental" backups of all of my drives and partitions by using rsync, updating the relevant removable drives so that I always have a full set of relatively current images, including even my boot drive, which, if worse came to worse, I could quickly install as replacements for my regular drives and then just boot normally. Anyway, when I am making my backups this way I do use the --exclude-from=FILE option for each separate partition that I back up, and I pre-populate the relevant exclusion files with pathnames that I don't believe should be backed up (e.g. /.snap). I also use the --delete and --delete-excluded options. No sense in having useless gunk messing up my backup partitions. There are however a few things that I'm not sure if I should or should not be routinely backing up. First and foremost, I have always wondered about the wisdom, or lack thereof, of using rsync to back up the various UFS partition /.sujournal files. It seems to me that given the fact that I am asking rsync to simply copy the source .sujournal file to the backup partition... which is live and active as I am doing that... that this is probably a Bad Idea. So for now I am simply excluding from the backups all of the .sujournal files. So, I'm just wondering... Given that I am doing that and that I thus end up with -no- .sujournal files on my backup partitions, should I be using tunefs and turning off journaling on all of these (backup) UFS partitions? Separately, I do also wonder about the stuff in my /var partition, and about what bits of that stuff are really just ephemeral flotsam that are just a waste of time to back up. So, dear friends, which of the following are subdirectories that you believe would be a waste of time to make backups of? Which if any of these would cause a system to refuse to boot, if the directories themselves simply did not exist? (Note that this is -not- a full list of all of the directories under my /var directory. I have pre-trimmed out all of the ones that I know that I do want to back up routinely.) /var/at /var/at/jobs /var/at/spool /var/account /var/crash /var/run /var/run/ppp /var/run/dhclient /var/run/wpa_supplicant /var/run/resolvconf /var/run/resolvconf/interfaces /var/run/resolvconf/metrics /var/run/avahi-daemon /var/run/tpm /var/run/dbus /var/run/cups /var/run/cups/certs /var/run/PolicyKit /var/run/ConsoleKit /var/run/libuuid /var/run/hald /var/run/hald/hald-local /var/run/hald/hald-runner /var/run/samba4 /var/run/samba4/nmbd /var/run/samba4/ncalrpc /var/run/samba4/ncalrpc/np /var/run/samba4/winbindd /var/run/lirc /var/audit /var/audit/remote /var/audit/dist /var/yp /var/msgs /var/db /var/db/etcupdate /var/db/etcupdate/current /var/db/etcupdate/current/usr /var/db/etcupdate/current/usr/share /var/db/etcupdate/current/usr/share/nls /var/db/etcupdate/current/etc /var/db/etcupdate/current/etc/autofs /var/db/etcupdate/current/etc/gss /var/db/etcupdate/current/etc/defaults /var/db/etcupdate/current/etc/newsyslog.conf.d /var/db/etcupdate/current/etc/mail /var/db/etcupdate/current/etc/bluetooth /var/db/etcupdate/current/etc/pkg /var/db/etcupdate/current/etc/mtree /var/db/etcupdate/current/etc/dma /var/db/etcupdate/current/etc/ssl /var/db/etcupdate/current/etc/security /var/db/etcupdate/current/etc/cron.d /var/db/etcupdate/current/etc/syslog.d /var/db/etcupdate/current/etc/devd /var/db/etcupdate/current/etc/ppp /var/db/etcupdate/current/etc/periodic /var/db/etcupdate/current/etc/periodic/security /var/db/etcupdate/current/etc/periodic/monthly /var/db/etcupdate/current/etc/periodic/weekly /var/db/etcupdate/current/etc/periodic/daily /var/db/etcupdate/current/etc/pam.d /var/db/etcupdate/current/etc/ssh /var/db/etcupdate/current/etc/rc.d /var/db/etcupdate/current/boot /var/db/etcupdate/current/root /var/db/etcupdate/current/var /var/db/etcupdate/current/var/crash /var/db/ports /var/db/ports/multimedia_smplayer /var/db/ports/devel_gmake /var/db/ports/multimedia_ffmpeg /var/db/ports/devel_nasm /var/db/ports/devel_binutils /var/db/ports/devel_bison /var/db/ports/print_texinfo /var/db/ports/misc_help2man /var/db/ports/textproc_texi2html /var/db/ports/devel_cmake /var/db/ports/devel_py-Jinja2 /var/db/ports/devel_py-babel /var/db/ports/textproc_py-docutils /var/db/ports/textproc_py-snowballstemmer /var/db/ports/security_py-openssl /var/db/ports/devel_p5-Locale-libintl /var/db/ports/devel_automake /var/db/ports/security_rhash /var/db/ports/devel_ninja /var/db/ports/audio_lame /var/db/ipf /var/db/zfsd /var/db/zfsd/cases /var/db/pkg /var/db/hyperv /var/db/freebsd-update /var/db/entropy /var/db/ntp /var/db/portsnap /var/db/portsnap/files /var/db/fontconfig /var/db/colord /var/db/colord/icc /var/db/rarian /var/db/samba4 /var/db/samba4/private /var/db/samba4/private/msg.sock /var/db/samba4/bind-dns /var/db/samba4/msg.lock /var/db/samba4/printing /var/db/samba4/winbindd_privileged /var/db/postfix /var/db/mysql /var/db/mysql/mysql /var/db/mysql/#innodb_temp /var/db/mysql/performance_schema /var/db/mysql/sys /var/db/mysql_secure /var/db/mysql_tmpdir /var/tmp /var/tmp/vi.recover /var/games /var/preserve /var/authpf /var/empty /var/cron /var/cron/tabs /var/backups /var/rwho /var/log /var/log/ConsoleKit /var/log/cups /var/log/samba /var/log/samba4 /var/spool /var/spool/lpd /var/spool/lpd/lp /var/spool/dma /var/spool/output /var/spool/output/lpd /var/spool/opielocks /var/spool/mqueue /var/spool/clientmqueue /var/spool/lock /var/spool/cups /var/spool/cups/tmp /var/cache /var/cache/pkg /var/cache/cups /var/cache/cups/rss /var/cache/hald /var/heimdal /var/lib /var/lib/xkb /var/lib/dbus /var/lib/polkit-1 /var/lib/polkit-1/localauthority /var/lib/polkit-1/localauthority/90-mandatory.d /var/lib/polkit-1/localauthority/50-local.d /var/lib/polkit-1/localauthority/30-site.d /var/lib/polkit-1/localauthority/20-org.d /var/lib/polkit-1/localauthority/10-vendor.d /var/lib/PolicyKit /var/lib/PolicyKit-public /var/lib/misc /var/lib/hal /var/lib/hp /var/agentx