1

Topic: Using rsync to copy email backup on daily basis

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

0.9.7 with Apache, MySQL on Ubuntu 16.04

I used rsync to copy all files from my email server (Server A) to a backup server (Server B) using the command:

rsync -rPz root@1.2.3.4:/var/vmail /MailBackup

This copied everything (I believe).

I'd like a command which will copy the files on A NOT on B (I don't need A=B; if file xyz is on B but not A, I don't want it copied).

using the same rsync command seems to restart the entire backup process again from file 1 to file 1000.  I just want file 1001+ copied next time.

Help?

Andrew

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by Neutro 2019-06-28 23:51:26)

Re: Using rsync to copy email backup on daily basis

https://serverfault.com/questions/32250 … ction-only

rsync will not sync anything from dest(B) to source (A). It will only sync source (A) to dest (B). Rsync is not a bi-directional syncer.

Man page for reference: http://linux.die.net/man/1/rsync

Try to add --ignore-existing to your command:

This tells rsync to skip updating files that already exist on the destination (this does not ignore existing directories, or nothing would get done).