Streams of thought by...

This is the (tumble) log by Innerfusion, I'll post various things about code, design, politics, or whatever is interesting at the moment.

9/9/2009
10:51am
Comments (View)

Running rsync with sudo

Rsync can probably be the best deployment tool (among other things) to use if you consider how fast and efficient it is. Lately however, I’ve run into issues on needing to rsync into directories that required sudo privileges, luckily google gave me a bit of help when figuring out how to do it.

Here is a version that simply sends sudo to the server and prepends rsync with sudo:

# run rsync with sudo
stty -echo; ssh you@hostname 'sudo -v'; stty echo
rsync -avz --rsync-path='sudo rsync' ~/location/on/your/computer you@hostname:~/location/on/server

You’ll obviously want to replace you@hostname and the location paths.

Fork the gist

Posted in: snippets rsync linux deployment
10/1/2008
12:51am
Comments (View)

Installing PrinceXML on Ubuntu

I keep on forgetting how to install PrinceXML on Ubuntu, so here it is in case I forget.

You might have to install some fonts, mainly msttcorefonts so do:


      sudo apt-get install msttcorefonts
  

If you get an error about dependencies simply run :


      sudo apt-get -f install
      

to reinstall with dependencies Now download princexml at : http://www.princexml.com/download/ or cd into a temporary folder quick and run:


    curl -O http://www.princexml.com/download/prince_6.0r7-1_i386.deb
    

Then run:


    sudo dpkg -i prince_6.0r7-1_i386.deb
    

Run (to make sure that it works):


    prince --version
  

Posted in: ubuntu princexml linux