forked from backup/backup
-
Notifications
You must be signed in to change notification settings - Fork 0
Archives
meskyanichi edited this page Mar 14, 2011
·
11 revisions
Archives support:
- Files
- Folders
Below are examples you can copy/paste in to your "Backup" configuration file.
These blocks should be placed between Backup::Model.new(:my_backup, 'My Backup') do
and end
.
archive :my_archive do |archive|
archive.add '/path/to/a/file.rb'
archive.add '/path/to/a/directory/'
archive.exclude '/path/to/a/directory/exclude.rb'
archive.exclude '/path/to/a/directory/exclude-this/'
end
What this does is it creates a single .tar
file, called my_archive.tar
, that contains the file.rb
and everything inside /path/to/a/directory/
(including all sub-directories, except for the exclude-this
directory and the exclude.rb
Ruby file) and adds it to the backup file. You can archive as many files and folders as you like per archive
block. You can have as many archive blocks as you want as well.