LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2013, 09:05 AM   #1
muahahaha9001
LQ Newbie
 
Registered: Sep 2012
Location: Northern Virginia, USA
Distribution: Slackware, Debian, FreeBSD, Arch Linux, Ubuntu, Kubuntu, CentOS, OS X
Posts: 21

Rep: Reputation: 0
Distribute lots of files output by program across multiple locations (dirs, drives)


Hey Everyone

I just ran into an interesting dillemma at work. We had 450 GB of data and two 250 GB hard drives. I know that archiving and compression software can take a directory containing the 450 GB of data and output it into a series of smaller compressed archive files which can later be reassembled to extract the whole 450 GB directory.


For example,

Archive & Split:
Code:
tar czpvf - /path/to/archive | split -d -b 100M - tardisk
Reassemble & Extract:
Code:
cat tardisk* | tar xzpvf -
Now how could a command like this be executed whilst also having the logic behind it to distribute the archive files across each hard drive?

If I find a way to do this on my own, I'll update here as necesssary.
 
Old 10-02-2013, 01:42 PM   #2
dr_agon
Member
 
Registered: Sep 2007
Location: Poland
Distribution: Ubuntu LTS
Posts: 105
Blog Entries: 12

Rep: Reputation: 26
See e.g. http://www.gnu.org/software/tar/manu...Multiple-Tapes for detailed description of creating multi-volume archives by tar.

If it is not what you want - describe what exactly you need.
 
Old 10-02-2013, 04:40 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...or merge the two disks into one LVM?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync error: errors selecting input/output files, dirs (code 3) at main.c(323) cucolin@ Linux - Networking 4 09-17-2020 02:03 PM
[SOLVED] copying files from multiple locations to one destination mahmoodn Linux - General 3 02-21-2011 09:33 AM
tar files from multiple locations into a tarball preserving location paths Siljrath Linux - Newbie 2 07-10-2010 01:23 AM
Redirecting output to multiple locations? SirTristan Linux - Newbie 6 05-29-2008 03:52 PM
Gentoo Linux - how to map Apache server to look at php files in multiple locations bg108 Linux - Newbie 3 02-07-2008 04:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration