Monday, May 19, 2008

rcs + rsync for keeping your files on several machines

I have two GNU/Linux laptops (Xubuntu) and one GNU/Linux desktop (CentOS).

Need to synchronize them to keep the integrity of the information on the machines.

Tried git, but found it too strong too keep my little docs and code snippets.
That way decided to use well known and stable GNU tools rcs and rsync.

man rcs 
man rsync
are prerequisites ;

Why rcs? Because repository could be synced with code/docs, and it is GNU.
Why rsync? It is GNU solution for syncing files.

Two basic session snippets for usage:

init files for directory:

cd fldr_for_sync
mkdir RCS
# --
rcs -i file # add new file under rcs
# -- it is the same with --
touch another_file; ci anoter_file


basic rsync dir with subdirs; it is not overwrites old files in dest dir;
permissions and links kept;

rsync -avz path_to_fldr_src path_to_dest


I found that rcs + sync can substitute git for such task and even make the task more clear and robust, due to the long history and high stability of the rcs and rsync tools.

No comments: