kumar
kumar

Reputation: 2580

two folders in sync - one is updated with the CVS

I have copied a folder say "folder" which is maintained in CVS as folder_backup. $cp -af folder folder_backup

Frequently I cvs update "folder" and I want folder_backup to be in sync with folder. Is there a automatic way to sync both folder and folder_backup whenever folder is cvs updated. Both are in the same machine.

Upvotes: 1

Views: 596

Answers (2)

yves Baumes
yves Baumes

Reputation: 9036

Well if you mean that 2 directories are on the same machine but not on the same drive, you'll need hard copy.

If only need to do backup from local CVS workdir into the backup directory, you need a unidrectional syncing tool. Rsync is one of them and easy to use. AFAI remember something as simple as rsync dir_from dir_to will to the trick.

If you mean that you want to be able to modify either of that 2 workdirs and you want to merge those 2 directories once in a while, you'll need a bidirectional syncing tool: Unison is one of them. I think it is quite hard to configure for the merge option, but it is worth the cost . See wikipeda page to compare syncing tools

Upvotes: 1

Space
Space

Reputation: 7259

If the folders are on the same system the best option is to link folder.

ln -s path/to/folder_backup/ folder

Upvotes: 1

Related Questions