Guest User

Untitled

a guest
Jun 19th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. passfile = '~/.rsyncpass'
  3. backups = {
  4. '/Volumes/Orange/Pol\\\'s\ iTunes' => '/media/Music',
  5. # '/Users/pol/Pictures' => '/media/Pictures/Pol\\\'s\ Pictures',
  6. '/Users/pol/Documents' => '/backup/Pol\\\'s\ Documents'
  7. }
  8.  
  9. backups.each_pair do |src, dst|
  10. cmd = "rsync -uaP --password-file #{passfile} --stats #{src} rsync://rsync@192.168.1.5#{dst}"
  11. puts "Running `#{cmd}`..."
  12. exec cmd
  13. end
Add Comment
Please, Sign In to add comment