Affichage des articles dont le libellé est backup. Afficher tous les articles
Affichage des articles dont le libellé est backup. Afficher tous les articles

lundi 31 août 2020

Rsync and exclusions

 

an old post found back on disqr about rsync (original date : circa 2016)

You might want to use the rsync exclude options directly in your script either by specifying a file with all the exclusions to perform, or by specifying them in the command line directly :

--exclude-from <file-name with 1 pattern by line>
--exclude <file or="" dir="">

For example :

rsync -r -a -v -e "ssh -l Username" \
        --exclude 'dbconfig.xml' --exclude 'WEB-INF/classes/' --delete \
        /local/Directory remote.server:/remoteDirectory

One important thing to keep in mind when excluding a directory is that rsync will always consider the path to be relative to the source directory.



This can be used for example when you want to push your production from a Production JIRA instance to a Staging JIRA instance, but your dbconfig.xml is different (different DB auth parameters for example), and hence want to avoid some files. 

vendredi 8 février 2013

SVN backup repository with history

Copier toutes l'historique d'un repository SVN auquel vous avez accès (en lecture), 
mais pas les droits d'administration :
 
 
  svnadmin create localrepos
  emacs localrepos/hooks/pre-revprop-change # make it 'exit 0' 
  chmod +x localrepos/hooks/pre-revprop-change
  svnsync init --username USERNAME file:///path/to/localrepos https://myproject.googlecode.com/svn
  Copied properties for revision 0.
  svnsync sync --username USERNAME file:///path/to/localrepos
 
Source : http://code.google.com/p/support/wiki/SubversionFAQ#How_do_I_download_my_Subversion_history? 
 
 
 
Donc :
$ svnadmin creat localrepos
$ cat > localrepos/hooks/pre-revprop-change
#! /bin/bash
exit 0

$ chmod a+x localrepos/hooks/pre-revprop-change
$ svnsync init --username USERNAME file:///NEWREPO https://OLDREPO
   Copied properties for revision 0.
$ svnsync sync --username USERNAME file:///NEWREPO 
[...copie de toutes les révisions...] 
 
 
 
Sur la machine où j'ai copié l'historique, j'ai du utiliser une feinte :
$ svnadmin setuuid UUID-OLDREPO
 
 
Puis, pour changer les "checkouts" de source, svn switch :
$ svn switch --relocate https://OLDREPO svn+ssh://NEWREPO 

Et voilà !


PS : si vous avez les accès svnadmin sur les deux machines, il y a plus simple comme solution.
http://particul.es/blog/index.php?post/Reprendre-un-projet-%3A-svn-tips-pour-changer-l-url-du-d%C3%A9pot


jeudi 15 janvier 2009

Visual Diff and merge tool : meld

Meld



"Meld is a visual diff and merge tool. You can compare two or three files and edit them in place (diffs update dynamically). You can compare two or three folders and launch file comparisons. You can browse and view a working copy from popular version control systems such such as CVS, Subversion, Bazaar-ng and Mercurial. Look at the screenshots page for more detailed features."


http://meld.sourceforge.net/.



Alternative tools (see meld page) :

Kdiff3, Xxdiff, TkDiff, GtkDiff.