From 02a8172eee2e016dee64203506d028b4b9b64300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sun, 6 Apr 2014 22:47:22 +0200 Subject: [PATCH] docs: More improvements --- attic/archiver.py | 3 +-- docs/index.rst | 12 +++++++++++- docs/quickstart.rst | 22 +++++++++++++--------- docs/usage.rst | 6 +++--- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/attic/archiver.py b/attic/archiver.py index b42e68327..2827209c8 100644 --- a/attic/archiver.py +++ b/attic/archiver.py @@ -254,8 +254,7 @@ Type "Yes I am sure" if you understand this and want to continue.\n""") return self.exit_code def do_list(self, args): - """List archive or repository contents - """ + """List archive or repository contents""" repository = self.open_repository(args.src) manifest, key = Manifest.load(repository) if args.src.archive: diff --git a/docs/index.rst b/docs/index.rst index 112c8b6bb..3d9f11986 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,7 +14,17 @@ Initialize a new backup :ref:`repository ` and create your first backup :ref:`archive ` in two lines:: $ attic init /somewhere/my-repository.attic - $ attic create -v /somewhere/my-repository.attic::Monday ~/Documents + $ attic create /somewhere/my-repository.attic::Monday ~/Documents + $ attic create --stats /somewhere/my-repository.attic::Tuesday ~/Documents + Archive name: Tuesday + Archive fingerprint: 387a5e3f9b0e792e91ce87134b0f4bfe17677d9248cb5337f3fbf3a8e157942a + Start time: Tue Mar 25 12:00:10 2014 + End time: Tue Mar 25 12:00:10 2014 + Duration: 0.08 seconds + Number of files: 358 + Original size Compressed size Deduplicated size + This archive: 57.16 MB 46.78 MB 151.67 kB + All archives: 114.02 MB 93.46 MB 44.81 MB See the :ref:`quickstart` chapter for a more detailed example. diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 5e6e67627..6e632b84e 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -18,11 +18,11 @@ A step by step example 2. Backup the ``~/src`` and ``~/Documents`` directories into an archive called *Monday*:: - $ attic create -v /somwhere/my-repository.attic::Monday ~/src ~/Documents + $ attic create /somwhere/my-repository.attic::Monday ~/src ~/Documents 3. The next day create a new archive called *Tuesday*:: - $ attic create -v --stats /somwhere/my-repository.attic::Tuesday ~/src ~/Documents + $ attic create --stats /somwhere/my-repository.attic::Tuesday ~/src ~/Documents This backup will be a lot quicker and a lot smaller since only new never before seen data is stored. The ``--stats`` option causes |project_name| to @@ -31,8 +31,8 @@ A step by step example Archive name: Tuesday Archive fingerprint: 387a5e3f9b0e792e91ce87134b0f4bfe17677d9248cb5337f3fbf3a8e157942a - Start time: Sun Apr 6 12:00:10 2014 - End time: Sun Apr 6 12:00:10 2014 + Start time: Tue Mar 25 12:00:10 2014 + End time: Tue Mar 25 12:00:10 2014 Duration: 0.08 seconds Number of files: 358 Original size Compressed size Deduplicated size @@ -43,19 +43,27 @@ A step by step example 4. List all archives in the repository:: $ attic list /somewhere/my-repository.attic + Monday Mon Mar 24 11:59:35 2014 + Tuesday Tue Mar 25 12:00:10 2014 5. List the contents of the *Monday* archive:: $ attic list /somewhere/my-repository.attic::Monday + drwxr-xr-x user group 0 Jan 06 15:22 home/user/Documents + -rw-r--r-- user group 7961 Nov 17 2012 home/user/Documents/Important.doc + ... 6. Restore the *Monday* archive:: - $ attic extract -v /somwhere/my-repository.attic::Monday + $ attic extract /somwhere/my-repository.attic::Monday 7. Recover disk space by manually deleting the *Monday* archive:: $ attic delete /somwhere/my-backup.attic::Monday +.. Note:: + Attic is quiet by default. Add the ``-v`` or ``--verbose`` option to + get progress reporting during command execution. Automating backups ------------------ @@ -82,10 +90,6 @@ of old archives:: # and 6 monthly archives. attic prune -v $REPOSITORY --keep-daily=7 --keep-weekly=4 --keep-monthly=6 -.. Note:: - This script assumes the repository has already been initialized with - :ref:`attic_init`. - .. _encrypted_repos: Repository encryption diff --git a/docs/usage.rst b/docs/usage.rst index 172b952d9..d04b8e13c 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -21,13 +21,13 @@ Examples ~~~~~~~~ :: - # Local backup repository + # Local repository $ attic init /data/mybackuprepo.attic - # Remote backup repository + # Remote repository $ attic init user@hostname:mybackuprepo.attic - # Encrypted remote backup repository + # Encrypted remote repository $ attic init --encryption=passphrase user@hostname:mybackuprepo.attic