Module: Puppet::Util::Backups
- Defined in:
- lib/puppet/util/backups.rb
Instance Method Summary collapse
-
#perform_backup(file = nil) ⇒ Object
Deal with backups.
Instance Method Details
#perform_backup(file = nil) ⇒ Object
Deal with backups.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/puppet/util/backups.rb', line 7 def perform_backup(file = nil) # if they specifically don't want a backup, then just say # we're good return true unless self[:backup] # let the path be specified file ||= self[:path] return true unless Puppet::FileSystem.exist?(file) (bucket ? perform_backup_with_bucket(file) : perform_backup_with_backuplocal(file, self[:backup])) end |