Memory consumption for rsync -axv --delete

Paul Slootman paul+rsync at
Fri Mar 25 10:51:58 UTC 2016

On Fri 25 Mar 2016, John Long wrote:
> I have been using rsync for many years and never had any kind of problem.
> Lately I am running out of RAM trying to do an incremental backup to a box
> that only has 2G of RAM. The entire directory structure I'm mirroring is
> about 200G of files. A minority of subdirectories have many files.
> Is there a way to do an incremental backup with --delete option that does
> not use as much memory? Is there a way to tell rsync to use a tempfile
> instead of RAM for keeping tracking of whatever it does?

No to the last question; you could consider adding (more) swapspace to
the system, which is effectively like using a tempfile.

> And would it be useful to add ignores for the subdirectories I know have
> many files and back them up separately? Is --delete safe to use in this
> case, as in does --delete with --ignore somedir/ not delete files in other
> target dirs that are not in the ignore path?

There's no --ignore, you probably mean --exclude.
I don't really understand what you're asking in your last question...
Why should --exclude somedir/ affect what --delete does elsewhere?
--delete will still delete stuff elsewhere if necessary.
Also look at the description of --delete and --delete-excluded, if you
have any questions about what's in the manpage then feel free to ask
those here; but for now I get the impression you haven't spent much time
reading the manpage.


More information about the rsync mailing list