Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

We are using rsnapshot for backups. It uses hard links to efficiently store unchanged files, and rsyncs the changed files from servers.

The hard linking part calls a command like this

  cp -al /current /old

But this process uses up ALL the available memory. Is there a way to limit memory of cp process, or is there a memnice utility a la nice/ionice?

share|improve this question
up vote 4 down vote accepted

rsnapshot includes support for --link-dest support using rsync which would avoid the cp -al step. Rsync 3.0+ doesn't have to keep the entire directory tree in memory and would probably work better in your situation.

share|improve this answer
The --link-dest patch was written by the original author of dirvish (which is similar to rsnapshot but more complex/powerful), probably to overcome the limitations of cp -al. – Andrew Jul 1 '10 at 3:31
that changed the backup time from 15+ hours to just 6 hours. Thanks :) – hayalci Jul 5 '10 at 8:11
There's more discussion on an alternative technique here - basically rotating the last hourly snapshot into the new one and doing a cp -afl from hourly.1 onto hourly.0 but I haven't tried that - you'd have to do the rotation manually rather than relying on rsnapshot to do it – David Fraser Jul 22 '11 at 8:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.