Skip to content

Instantly share code, notes, and snippets.

@jerius
Created October 15, 2011 18:27
Show Gist options
  • Select an option

  • Save jerius/1289935 to your computer and use it in GitHub Desktop.

Select an option

Save jerius/1289935 to your computer and use it in GitHub Desktop.
from os import *
ip = raw_input("Destination server IP: ")
for each in listdir('/var/cpanel/users'):
system('/scripts/pkgacct --skiphomedir --nocompress %s /home cpmove' % each)
system('scp /home/cpmove-*.tar root@%s:/home/' % ip)
system('rsync -avHle ssh /home/%s/ root@%s:/home/%s/ --progress' % (each, ip, each))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment