1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 17:27:31 +00:00

Merge pull request #38 from jdchristensen/quickstart

Quickstart and --weekly doc fixes
This commit is contained in:
Jonas Borgström 2014-02-10 12:50:57 +01:00
commit 22548841a2
2 changed files with 12 additions and 8 deletions

View file

@ -579,7 +579,7 @@ def run(self, args=None):
subparser.add_argument('-d', '--daily', dest='daily', type=int, default=0, subparser.add_argument('-d', '--daily', dest='daily', type=int, default=0,
help='number of daily archives to keep') help='number of daily archives to keep')
subparser.add_argument('-w', '--weekly', dest='weekly', type=int, default=0, subparser.add_argument('-w', '--weekly', dest='weekly', type=int, default=0,
help='number of daily archives to keep') help='number of weekly archives to keep')
subparser.add_argument('-m', '--monthly', dest='monthly', type=int, default=0, subparser.add_argument('-m', '--monthly', dest='monthly', type=int, default=0,
help='number of monthly archives to keep') help='number of monthly archives to keep')
subparser.add_argument('-y', '--yearly', dest='yearly', type=int, default=0, subparser.add_argument('-y', '--yearly', dest='yearly', type=int, default=0,

View file

@ -11,7 +11,7 @@ The next section continues by showing how backups can be automated.
A step by step example A step by step example
---------------------- ----------------------
1. Before any backup can be taken a repository has to be initialized:: 1. Before a backup can be made a repository has to be initialized::
$ attic init /somewhere/my-backup.attic $ attic init /somewhere/my-backup.attic
@ -25,8 +25,8 @@ A step by step example
$ attic create -v --stats /somwhere/my-backup.attic::second-backup ~/src ~/Documents $ attic create -v --stats /somwhere/my-backup.attic::second-backup ~/src ~/Documents
This backup will be a lot quicker and a lot smaller since only new never This backup will be a lot quicker and a lot smaller since only new never
before seen data is stored. The ``--stats`` causes |project_name| to output before seen data is stored. The ``--stats`` option causes |project_name| to
statistics about the newly created archive such as the amount of unique output statistics about the newly created archive such as the amount of unique
data (not shared with other archives). data (not shared with other archives).
4. List all archives in the repository:: 4. List all archives in the repository::
@ -49,7 +49,7 @@ A step by step example
Automating backups Automating backups
------------------ ------------------
The following example script backups up ``/home`` and The following example script backs up ``/home`` and
``/var/www`` to a remote server. The script also uses the ``/var/www`` to a remote server. The script also uses the
:ref:`attic_prune` subcommand to maintain a certain number :ref:`attic_prune` subcommand to maintain a certain number
of old archives:: of old archives::
@ -65,14 +65,14 @@ of old archives::
/var/www \ /var/www \
--exclude /home/*/.cache \ --exclude /home/*/.cache \
--exclude /home/Ben/Music/Justin\ Bieber \ --exclude /home/Ben/Music/Justin\ Bieber \
--exclude *.pyc --exclude '*.pyc'
# Use the `prune` subcommand to maintain 7 daily, 4 weekly # Use the `prune` subcommand to maintain 7 daily, 4 weekly
# and 6 monthly archives. # and 6 monthly archives.
attic prune -v $REPOSITORY --daily=7 --weekly=4 --monthly=6 attic prune -v $REPOSITORY --daily=7 --weekly=4 --monthly=6
.. Note:: .. Note::
This script assumes the repository has already been initalized with This script assumes the repository has already been initialized with
:ref:`attic_init`. :ref:`attic_init`.
.. _encrypted_repos: .. _encrypted_repos:
@ -80,7 +80,7 @@ of old archives::
Repository encryption Repository encryption
--------------------- ---------------------
Repository encryption is enabled at repository encryption time:: Repository encryption is enabled at repository creation time::
$ attic init --encryption=passphrase|keyfile PATH $ attic init --encryption=passphrase|keyfile PATH
@ -130,3 +130,7 @@ mounting the remote filesystem, for example, using sshfs::
$ sshfs user@hostname:/path/to/folder /tmp/mymountpoint $ sshfs user@hostname:/path/to/folder /tmp/mymountpoint
$ attic init /tmp/mymountpoint/repository.attic $ attic init /tmp/mymountpoint/repository.attic
$ fusermount -u /tmp/mymountpoint $ fusermount -u /tmp/mymountpoint
However, be aware that sshfs doesn't fully implement POSIX locks, so
you must be sure to not have two processes trying to access the same
repository at the same time.