You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meskyanichi edited this page Mar 14, 2011
·
10 revisions
Archives
Archives support:
Files
Directories
Examples
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.
Files and Folders
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.