Skip to content

Instantly share code, notes, and snippets.

@asenchi
Forked from jerius/gist:1289935
Created October 17, 2011 13:15
Show Gist options
  • Select an option

  • Save asenchi/1292586 to your computer and use it in GitHub Desktop.

Select an option

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