How to split create zip files?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
SamLearnsLinux
Level 2
Level 2
Posts: 75
Joined: Wed Jun 27, 2018 6:13 am

How to split create zip files?

Post by SamLearnsLinux » Mon Nov 19, 2018 3:44 am

I am on a digital ocean VPS and using SSH to create a zip file for backup. The folder I am trying to zip is a little over 13 gb and I have only 9 gb space on my VPS.

I am using this command to create the zip.
zip -r foldername.zip foldername/
Is there any way I can split create this zip? Such that I can create two zip files of 6.5gb each? So that I can download the first 6.5 gb zip and then download the second 6.5gb zip? This is important because I should be able to pause in between, download the first zip, delete it and then resume the whole thing. Else I will run out of space

I want to split it at creation itself and not after I create it. Also there must not be an overlap between the two zip files. The second zip file must start right where the first one ended. Is this possible?

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to split create zip files?

Post by catweazel » Mon Nov 19, 2018 4:25 am

SamLearnsLinux wrote:
Mon Nov 19, 2018 3:44 am
I want to split it at creation itself and not after I create it.
man zip
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

SamLearnsLinux
Level 2
Level 2
Posts: 75
Joined: Wed Jun 27, 2018 6:13 am

Re: How to split create zip files?

Post by SamLearnsLinux » Mon Nov 19, 2018 4:56 am

catweazel wrote:
Mon Nov 19, 2018 4:25 am
SamLearnsLinux wrote:
Mon Nov 19, 2018 3:44 am
I want to split it at creation itself and not after I create it.
man zip
Thank you! I used this out on my local machine I was able to split create zips with pause using

Code: Select all

zip -sp -s 5m -r example.zip foldername/
and got the output as

example.z01 example.z02 example.z03 example.zip

I am struggling to unzip these files though, I have tried to concatenate the zips but nothing happens?

I used this to concatenate

Code: Select all

cat example.z* > ~/example-full.zip
And the archive manager gui is also not helping. Any help on how to unzip these files?

User avatar
Flemur
Level 16
Level 16
Posts: 6279
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to split create zip files?

Post by Flemur » Mon Nov 19, 2018 1:36 pm

SamLearnsLinux wrote:
Mon Nov 19, 2018 4:56 am
example.z01 example.z02 example.z03 example.zip
And the archive manager gui is also not helping. Any help on how to unzip these files?
Try just unzipping "example.zip" and don't 'cat' anything.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Post Reply

Return to “Newbie Questions”