Dear Folks,

I have to backup pgsql database dump everynight on a routine. The database dump actually contains sql(text) statements. The actual size of the database dump is aroung 800 MB. Between two days backup, only few lines of statements are modified/added/deleted.

I dont want to do incremental backup. Instead, I want everyday's full dump to be stored on to a folder named DD-MM-YY(ex: 01-05-0. Everyday there will be a folder created with name DD-MM-YY and the dump will be stored there.

Since the difference between the two day's backup are pretty minimal, I dont want to resend the 800 MB files everyday.


1. I have taken yesterdays dump in a folder named 04-05-08 in database server
2. I have rsynced the folder 04-05-08 to the backup server.
3. I have taken today's dump in folder named 05-05-08 in database server.
4. Now while doing rsync, I want rsync to compare the <database server's 05-05-08/dump file> with the <04-05-08/dump file> which already exists in backup server. (then eventually, I want rsync to send only the differences and store the output in folder 05-05-0.

Typicaly I want to take advantage of yesterday's file which already present in a different folder.

Can anyone suggest a working method to implement this ? (I tried --copy-dest / --compare-dest .. but couldnt get it to work)

Any response in this regard is most appreciated.