From owner-freebsd-questions@freebsd.org Fri Dec 7 08:29:08 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 38DEB132E8ED for ; Fri, 7 Dec 2018 08:29:08 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (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 0896F7DA98 for ; Fri, 7 Dec 2018 08:29:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.252.129]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1MEVBa-1gfbdo1f2Y-00G4il; Fri, 07 Dec 2018 09:28:58 +0100 Date: Fri, 7 Dec 2018 09:28:58 +0100 From: Polytropon To: Matthias Petermann Cc: freebsd-questions Subject: Re: /sbin/dump: instant exit in case of disk full (instead of prompting for next volume) Message-Id: <20181207092858.101f83be.freebsd@edvax.de> In-Reply-To: <6116a4e5-34d1-3823-dd5e-28c784083cf2@petermann-it.de> References: <6116a4e5-34d1-3823-dd5e-28c784083cf2@petermann-it.de> 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:NR16n4h6ZlW1/59DgLdhGh7d8ycSwojK60mJX1AJ60eWr+hhZY+ FX9KBhQW0xbPi/soetNjk0A8tq8E57nyNVM5Cd06u6jEIJ/2LLSBfVAVTAkrDZJsJMhsAfQ iIm5eAFqJVVP5DBkcziqFmYkGUv/M+0PapNnP3ZTc6iM5k4vqAt/vnDh+1qKRCMK9Jh15y6 fqze8JlB9IIYbXbrFqRlQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:f7Izn+YGfMs=:wAqfJnHqyxXPxvrk1bT4OY gSALPc/h0F9ghtR3vF8DW81koGNPtbL4m8KbYocknkpTVgtLiLp1POSzfkuMX+OW90rFUR+gw emlzUSEW4ANhqgPZ2wXuVqyHL7b3n7cxpm707AzknXhShHduytpnz/+sytggS/hjrgixzF+sV GCULybeAIemRGUJn2vVGWO3tw5Zc4dGuxF6jzmVJl6yEkzmz+6zbQFB9DUJ+8gKPW57lNaqDN qLtZRQVjct3gOZCJCPz4xfBeZF53ovCfm2yateu6X/joceykJvxLFSOBYBsP9Efnzk/kwLsxE olKLWtJDQbeL6ErCkO7aEpYFkQM6YG0w18oStEUwMyxSmEc/S9MnIVktlvaixbpUBRSDkPPAb tq3ci7CRUQiiMLAH1IYUFwX02GT6tAKMlKgYDW5LZ874n4lyGiYiQg9dBpqpp3pPi2Pp21mGV ++tS/vhZwg+Qej1YX0dYEKqirCVDnJnda2x3Lpa8D6FteV59FnIAgTs5YI2QHgGI1uwZe9AU8 jz1jSkrPP/YjjJlfR49uiBcB0GuilVEQgSdbXirSWPEdyBGuMj3qbj2pH2TTjdEjnOoxpJLWx jxQcr07YNEKNPujoG7qB+yXmfQlB6neSqiTm1XVTOI0OiVORgAoA0i66LlWikP96XY++4pKXW EvoUhyUg4ooLop1FLvoqW79/uaccAprfLjAq0U5S3Pj0Y5IRfEv3VqK2nuEkxBOpQTqw0sWef CCzj5Y2OLpNPlEfo3wr2wV+2V2FEYXaUOGhzhHAa2qCCueOxdATKwu0A2bE= X-Rspamd-Queue-Id: 0896F7DA98 X-Spamd-Result: default: False [-0.52 / 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.87)[-0.869,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.14)[ipnet: 212.227.0.0/16(-0.61), asn: 8560(-0.07), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.92)[-0.921,0]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.980,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)[133.126.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: Fri, 07 Dec 2018 08:29:08 -0000 On Fri, 7 Dec 2018 08:35:10 +0100, Matthias Petermann wrote: > I am using dump(8) to backup local filesystems to an USB drive. Is there > an easy way to non-interactively exit dump in case of target disk full > error? According to "man dump", this is a situation where operator interaction is explicitely required: The dump utility requires operator intervention on these conditions: end of tape, end of dump, tape write error, tape open error or disk read error (if there are more than a threshold of 32). In addition to alert- ing all operators implied by the -n key, dump interacts with the operator on dump's control terminal at times when dump can no longer proceed, or if something is grossly wrong. All questions dump poses must be answered by typing ``yes'' or ``no'', appropriately. This is consistent with your description. However, you could modify the dump program to exit with a specific error code if "disk is full" should be reached. > One way I explored was by using expect (script below), but I rather > would use exclusively tools from base and don't want to add extra > complexity to my backup script. It seems that using "expect" is a good solution here, as the "dump" program does not natively support what you want. > In case there is no easy way currently, would it make sense to enhance > dump to provide an option for non interactive mode? That is a legitimate request, and a feature most welcome. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...