1

I have 80 GB of files in a local directory that I want to back up, dividing them out onto different servers with a limited space quota, using rsync, like so:

LOCAL 80 Gb ====> server1: first 30 Gb
             ||
             ||=> server2: following 15 Gb
             ||=> server3: last 35 Gb

Every server is mounted on the local machine using WebDAV connection and davfs2, so I can avoid all SSH, keys, and similar ramblings. How can I split my files onto several destinations?

Ben N
  • 40,045
  • 17
  • 140
  • 181
fradeve
  • 453
  • 5
  • 11
  • What's the question? – Chris2048 Apr 09 '12 at 13:27
  • Sorry for the lack of clearness: is there a way to "divide out local files in different servers" using rsync? – fradeve Apr 10 '12 at 18:01
  • How close to the quota do you want to get? Do you wish to specify the figure yourself, or is the system quota enforced (i.e. you won't be able to store files once over it), without a 'grace' period, that is. – Chris2048 Apr 11 '12 at 19:05
  • To make the rsync script simple, the quota cold be specified manually – fradeve Apr 13 '12 at 14:57

1 Answers1

1

If these files are just for backup you could

  • create a (dated?) tar file of all the files you want to backup
  • then use the 'split' command to break it up into appropriately sized chunks
  • distribute one chunk to each server

As far as I now rsync doesn't have the functionality to distibute a file across servers. Another possibility is this:

  • create one directory representing each server
  • manually move/copy the files you want in each server to each of these directories, but if you copy, use hard-links so no more space is used.
  • rsync each directory to its respective server. create a script to do this if this is a regular task.
Chris2048
  • 720
  • 1
  • 6
  • 16