bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] linux-backup-include-empty-swapfile (embedded)


From: Michael R. Lawrence CISSP
Subject: Re: [Bug-tar] linux-backup-include-empty-swapfile (embedded)
Date: Fri, 2 Jun 2017 22:40:31 -0500

 GNU tar can't be told to --empty-file /var/cache/swap/swap1
ADDING THE LIVE RUINING FILE WILL CRASH TAR/SYSTEM 

A: Exclude the file , yet add an as empty...  as the boot will expect it, it will 0 out on shutdown.. 
in this use case,  BOOT will expect it.. , if one restored.. it will overwrite as is , just worried over kernel panic if it is gone.. 

also if your sharing a fs dump , --emptyfile ie /etc/shadow , password etc... ie empty other files for security reasons clean PII in some instances.. 

--empty-file /$path/....  nice to have feature... request.. 

but if I may , touch fake-empty file ??? how to append to tar as  /var/cache/swap/swap1



https://help.ubuntu.com/community/BackupYourSystem/TAR

tar -cvJf backup.tar.xz --exclude=/backup.tar.xz --one-file-system /

I can add Exclude --exclude=/var/cache/swap/swap1...(not excluding the file segfaults the process and or can crash the lil address@hidden) as this is RPI3 , with some custom built packages... anyhow it would be nice to run this as a docker/rkt , for faster compile times...

I however would prefer to back up this file as a place-holder (ie 0 bytes or just an empty file...) for compatibility reasons I need the empty file...
(it will be replaced on boot with swap data... on boot) , however not sure if on restore it/system would flake out.?? , so hence i'm trying to add it back via script into the archive.

I'm just not sure how to get tar to add the 1 file as empty... or append archive as 1 empty file @ path...

How to append the empty file in my backup script would be a a plus , more elegant...

, however i can force it via docker/restore script. via touch /var/cache/swap/swap1 , or by stuffing it unmoundted (from RPI3) in my laptop or Sabayon-virtualbox etc... browse and stuff it back in... also a pain in the @####...

#!/bin/bash
#
# backup Gentoo RPi3 64 Necrose99 
#
#  if portage has lots of packages it will bloat the backup. , Swapfile will crash the backup.
# can use the script to dump fs also for docker. 
tar -cvJf /backup.tar.xz --exclude=/var/cache/swap/swap1 --exclude=/usr/portage/*  --exclude=/backup.tar.xz --one-file-system /

## TO DO , find a way to tuck the swap1 file back.. into archive... 



View My current Resume on Resumonk

https://www.resumonk.com/Fqx1XonLErULkVSOiZASsQ

 

 


data-pin-nopIn=trueAssociate of (ISC)² Issued to Michael Issued by (ISC)² (CISSP Exam passed)

http://lpc1.clpccd.cc.ca.us/lpc/mdaoud/CNT69/images/Security+Logo.jpghttp://www.sscc.edu/specialized/images/logo-comptia-network.jpghttp://www.axisdiscovery.com/img/assn-mcp-badge.png


HEIghT="205hEIghT=194
Michael Robert Lawrence address@hidden   

Work address@hidden
Information Security Analyst II / Engineer

Dallas Fort Worth Residence : 2205 Village Circle # 714 Bedford,  Texas , 76022
Home: +1-817-857-3521 Cellular:+1-317-909-2009

http://www.linkedin.com/in/itsecmichaelrlawrence

View Michael Robert Lawrence's profile on LinkedIn   skype:Necrose99

My QR vCard
My vCard

On Fri, Jun 2, 2017 at 3:57 PM, Sergey Poznyakoff <address@hidden> wrote:
Michael R. Lawrence CISSP < address@hidden> ha escrit:

> https://superuser.com/questions/1214855/linux-backup-include-empty-swapfile
>
> tar -cvJf backup.tar.xz --exclude=/backup.tar.xz --one-file-system /
>
> --emptyfile /var/swapfile   alias EXCLUDE , touch > filename > /var/swapfile
>  @ tar.xz (etc)
>
> touching the the swap file crashes tar...  , however a empty placeholder
> wanted root owned... , as it needs to be , as its were RPI-3 adds swap ram.

Could you take the trouble to explain what did you mean?  With all due
respect, this seems completely undecipherable to me.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]