Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- passfile = '~/.rsyncpass'
- backups = {
- '/Volumes/Orange/Pol\\\'s\ iTunes' => '/media/Music',
- # '/Users/pol/Pictures' => '/media/Pictures/Pol\\\'s\ Pictures',
- '/Users/pol/Documents' => '/backup/Pol\\\'s\ Documents'
- }
- backups.each_pair do |src, dst|
- cmd = "rsync -uaP --password-file #{passfile} --stats #{src} rsync://rsync@192.168.1.5#{dst}"
- puts "Running `#{cmd}`..."
- exec cmd
- end
Add Comment
Please, Sign In to add comment