Class: ServerBackups::WebsiteBackup
- Inherits:
-
BackupBase
- Object
- BackupBase
- ServerBackups::WebsiteBackup
- Defined in:
- lib/server_backups/website_backup.rb
Constant Summary collapse
- SNAPSHOT_PATH =
Pathname('~/.var.www.backup.tar.snapshot.bin').
Constants inherited from BackupBase
BackupBase::BACKUP_TYPES, BackupBase::TIMESTAMP_FORMAT
Instance Attribute Summary
Attributes inherited from BackupBase
#backup_type, #config, #logger, #s3, #working_directory
Instance Method Summary collapse
Methods inherited from BackupBase
#backup_path, #backup_s3_key, daily, #do_backup, incremental, #incremental?, #initialize, #load_resources, monthly, #remove_old_backups, #s3_prefix, #store_backup, #take_backup, #timestamp, #title, weekly
Constructor Details
This class inherits a constructor from ServerBackups::BackupBase
Instance Method Details
#backup_filename ⇒ Object
9 10 11 |
# File 'lib/server_backups/website_backup.rb', line 9 def backup_filename "#{self.class.name.demodulize.underscore}.#{backup_type}.#{timestamp}.tgz" end |
#create_archive_command ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/server_backups/website_backup.rb', line 13 def create_archive_command " tar --create -C '\#{config.web_root}' --listed-incremental=\#{SNAPSHOT_PATH} --gzip \\\n --no-check-device \\\n \#{'--level=0' unless incremental?} \\\n --file=\#{backup_path} \#{config.web_root}\n CMD\nend\n" |
#restore(time) ⇒ Object
7 |
# File 'lib/server_backups/website_backup.rb', line 7 def restore(time); end |