Author Topic: Modifying tar.gz / tar file to prevent extraction?  (Read 5081 times)

0 Members and 1 Guest are viewing this topic.

Offline postcd

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 0
  • Gender: Male
  • just curious
    • View Profile
    • Awards
Modifying tar.gz / tar file to prevent extraction?
« on: May 04, 2014, 07:59:56 pm »
Hello,

im making backups of sensitive data to my VPS, i cant trust owner of the VPS node fully.
So i got an idea on which i need Your comments.

I can zip file with password, but i just discovered zip may not pack files larger 2gb, got some error like
"zip warning: name not matched: /backup/incremental/accounts/yzbuutpo/homedir/public_html/wp-content/themes/twentytwelve/bomba1/dovecot"

so i got idea renaming my backups to something uninteresting and without tar.gz extension.
and another level of protection - can i anyhow edit the archive easilly so non professional dont recognize what file type it is and also make it corrupted for extraction by editting somehow easilly archive content? If anyone point to a guide, im linux amateur? Thank you

PS i assume i can also use openssl to encrypt archive, but i think it would eat alot of resources to encrypt like 15gb file..
« Last Edit: May 04, 2014, 08:02:10 pm by postcd »
no general writing in my threads please, only helpfull ontopic please

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18148
  • Karma: 473
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #1 on: May 04, 2014, 08:37:10 pm »
have you considered using encfs to create an encrypted password protected directory for your backups ?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline postcd

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 0
  • Gender: Male
  • just curious
    • View Profile
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #2 on: May 05, 2014, 09:24:23 pm »
no, im linux amateur.
no general writing in my threads please, only helpfull ontopic please

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18148
  • Karma: 473
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #3 on: May 05, 2014, 10:30:12 pm »
Which distro/version/architecture ?

Are we talking about a server edition (without a GUI desktop environment) .. or do you have a desktop environment ?

encfs isn't that hard to use .. see the man page:
Code: [Select]
man encfs
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline postcd

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 0
  • Gender: Male
  • just curious
    • View Profile
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #4 on: May 05, 2014, 10:33:50 pm »
Redhat, centos 5.9, server, SSH only...
no general writing in my threads please, only helpfull ontopic please

Offline chemicalfan

  • Hero Member
  • *****
  • Posts: 1166
  • Karma: 36
  • Gender: Male
  • I've been here a little while!
    • View Profile
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #5 on: May 06, 2014, 08:37:32 am »
You can encrypt files yourself on the command line with gpg - make the backup tar, then encrypt it, then you can upload it safely.

Info is here - https://www.gnupg.org/
Howto here - https://help.ubuntu.com/community/GnuPrivacyGuardHowto

Offline postcd

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 0
  • Gender: Male
  • just curious
    • View Profile
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #6 on: May 06, 2014, 05:00:31 pm »
That is too much computer work to tar, then encrypt then transfer. I need some lightweight one command way
no general writing in my threads please, only helpfull ontopic please

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18148
  • Karma: 473
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #7 on: May 06, 2014, 09:40:05 pm »
You're asking the impossible .. if you need to copy/move files and or use compression, you have no option other than to use I/O, CPU, and if copying across a network bandwidth resources.

chemicalfan explained how to limit the impact ..

You can limit I/O, CPU, and/or bandwidth impact, but that will cause it to take longer .. there is NO magic way to achieve both speed and low system resource usage.
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline postcd

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 0
  • Gender: Male
  • just curious
    • View Profile
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #8 on: May 06, 2014, 09:49:36 pm »
thx, i dont need high speed of the task (i badly said that, i need most speed effective), i just ask which is the most cpu, i/o effective command to achieve mentioned task?
no general writing in my threads please, only helpfull ontopic please

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18148
  • Karma: 473
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #9 on: May 06, 2014, 10:15:11 pm »
But that depends on YOUR priorities .. nobody else can know those.

chemicalfan told you to look into  the use of "nice" to limit scheduling priority.

rsync can sync and compress at the same time .. you can limit I/O bandwidth with rsync's --bwlimit= option .. and run it with a high nice number so the system favcours other processes.

and if you sync to an encrypted folder........

See:
Code: [Select]
man encfs
and
Code: [Select]
man nice
and
Code: [Select]
man rsync
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline postcd

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 0
  • Gender: Male
  • just curious
    • View Profile
    • Awards
Re: Modifying tar.gz / tar file to prevent extraction?
« Reply #10 on: May 06, 2014, 11:04:44 pm »
thanks that looks like good way that rsync with compression and with nice.
but i dont understand that encfs, backup is made automatically to /backup folder
is there any command for encfs that is needed to run on each boot, or setup only requires one time command? or command can be added just before rsync ommand?
no general writing in my threads please, only helpfull ontopic please

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal