Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to rsync my 3TB big hard drive to two external 2TB hard drives?
If so what would the command look like?

If not, can you think of another solution to sync 3TB of data to 2x 2TB drives? The only way I can think of is to manually copy the files... but loosing all of rsync's power this way :(

share|improve this question
up vote 1 down vote accepted

Options include setting up the destination drives as a single volume (RAID, LVM, btrfs...), or running two rsync commands on subsets of the data on the 3TB drive. The former option makes the job simple (there's only one target) but has the disadvantage that both drives must be connected to access the data. The latter is a little more effort, since it is necessary to identify a set of folders that is less than or equal to 2TB in size, but allows access to the data on each target drive independently. The best way to construct the rsync commands, if the set of folders is more complex than a few on the root of the 3TB drive, is probably to make use of rsync's --exclude-from option.

share|improve this answer
Thanks, I think the option with having two separate rsync commands is the one I will be end up using. I'll make a text file excluding unwanted files/folders which will then be synced with the second rsync command. To use patterns in the text file would I be typing A* or 'A*'? Is this command case sensitive? – jrn Jan 6 '13 at 19:21
It's case sensitive, and you want to list files one per line. The same format can be used as in the du command I suggested above - to match everything starting with a through n, use /[a-nA-N]. To match only directories with that format, make it /[a-nA-N]/. The preceding / is to ensure it only matches at the root of the transfer, so that no subfolders are inadvertently excluded. No quotes are necessary in an exclude file (using --exclude-from), but single quotes are needed if using --exclude= to stop the shell from interpreting the pattern instead of rsync itself. – Darael Jan 6 '13 at 19:29

1) Simplest way:

If the 3TB of data is in directories less then 2TB, simply use two rsync commands.

3TB  --- Folder1 with 1½TB --> rsync ---> 2TB drive
         Folder1 with 1½TB --> rsync ---> 2TB drive

2) Alternative:
Or mount both 2TB drives as a single volume. E.g. with linear mode or a stripe or storage spaces. (Linear mode would concatenate both drives in a form of RAID0. A stripe would alternate between writing to them.)

3) Alternative:
Or mount the second 2TB drive in a folder in a volume on the first drive.

share|improve this answer
So for option 1) would it make sense to copy all folders starting with A* to N* to drive 1 and all folders O* to Z* to drive 2? I guess I'd be using exclude in this case. – jrn Jan 6 '13 at 19:13
If all folders are about equal in size: yes. – Hennes Jan 6 '13 at 19:15
I would suggest using du to check that the total size of folders a*-n* is <= 2TB - after all, they may be unbalanced. du -c [a-nA-N]* will do this (reports the total size of all files and folders in the current directory with names starting with a to n or A to N - for some other folder, use /path/to/folder/[a-nA-N]*). – Darael Jan 6 '13 at 19:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .