Skip to content

Commit

Permalink
Merge pull request mixxxdj#30 from mixxxdj/Website-backup
Browse files Browse the repository at this point in the history
Wiki archive: exclude unneeded directories
  • Loading branch information
rryan committed May 14, 2018
2 parents 5e4ecdb + 22dc134 commit 6e1f379
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ def snapshot(snapshot_name=None):
FORUMS_DATABASE_NAME, mysql_snapshot))

wiki_path = os.path.join(instance_path, 'wiki')
wiki_snapshot = 'wiki.tar.gz'
sudo('tar czf {} -C {} .'.format(wiki_snapshot, wiki_path))
wiki_snapshot = 'wiki.tar.bz2'
# Exclusions to save space & time per https://www.dokuwiki.org/faq:backup
sudo('tar --exclude=\'data/cache\' --exclude=\'data/index\' --exclude=\'data/locks\' --exclude=\'data/tmp\' -cjpf {} -C {} .'.format(wiki_snapshot, wiki_path))

# Record snapshot name for chaining commands.
env.snapshot_name = snapshot_name
Expand Down

0 comments on commit 6e1f379

Please sign in to comment.