update README

This commit is contained in:
James Barnett 2016-04-22 20:11:06 -05:00
parent fff40e3ec9
commit ff74d7cb68
2 changed files with 26 additions and 27 deletions

0
99_grub-config.hook Executable file → Normal file
View file

View file

@ -16,14 +16,15 @@ threshold in the snapper configuration file.
Additionally the package provides a hook to regenerate your GRUB configuration Additionally the package provides a hook to regenerate your GRUB configuration
file after every pacman transaction. This is useful when using file after every pacman transaction. This is useful when using
[grub-btrfs](https://aur.archlinux.org/packages/grub-btrfs-git/). [grub-btrfs](https://aur.archlinux.org/packages/grub-btrfs-git/). If you don't
use grub-btrfs, then you should remove `99_grub-config.hook` after installation.
## Installation ## Installation
Install [the package from the Install [the package from the
AUR](https://aur.archlinux.org/packages/snap-pac/). AUR](https://aur.archlinux.org/packages/snap-pac/).
Optionally install Optionally, install
[grub-btrfs](https://aur.archlinux.org/packages/grub-btrfs-git/) to populate [grub-btrfs](https://aur.archlinux.org/packages/grub-btrfs-git/) to populate
your GRUB menu with the ability to boot into snapshots. your GRUB menu with the ability to boot into snapshots.
@ -32,11 +33,11 @@ your GRUB menu with the ability to boot into snapshots.
**Use pacman (and AUR helpers) as normal and watch snapper do its thing.** No **Use pacman (and AUR helpers) as normal and watch snapper do its thing.** No
bash scripts for you to call. No bash aliases to setup. bash scripts for you to call. No bash aliases to setup.
Because these are pacman hooks, it doesn't matter how you call pacman (whether Because these are pacman hooks, it doesn't matter how you call pacmanwhether
directly, through an AUR helper, or an alias)---snapper will create the directly, through an AUR helper, or an alias, snapper will create the
snapshots whenever pacman is asked to install, upgrade, or remove a package. The snapshots whenever pacman is asked to install, upgrade, or remove a package. The
description for the snapshot is the pacman command that called the hook in the specific pacman command used is noted in the snapper description for the
first place. snapshots.
### Example ### Example
@ -60,42 +61,40 @@ Installing the `nano` package as normal:
(1/1) snapper pre snapshot (1/1) snapper pre snapshot
:: Processing package changes... :: Processing package changes...
(1/1) installing nano [######################################] 100% (1/1) installing nano [######################################] 100%
:: Running post-transaction hooks... :: Running post-transaction hooks...
(1/1) snapper post snapshot (1/2) snapper post snapshot
(2/2) generate GRUB configuration file
And here are the snapshots: And here are the snapshots:
# snapper -c root list -t pre-post | tail -n 1 # snapper -c root list -t pre-post | tail -n 1
1033 | 1034 | Fri 22 Apr 2016 01:54:13 PM CDT | Fri 22 Apr 2016 01:54:14 PM CDT | pacman -S nano | 1033 | 1034 | Fri 22 Apr 2016 01:54:13 PM CDT | Fri 22 Apr 2016 01:54:14 PM CDT | pacman -S nano |
What changed (see the man page for what each symbol means)? What changed?
# snapper -c root status 1033..1034 # snapper -c root status 1033..1034
+..... /etc/nanorc +..... /etc/nanorc
c..... /etc/snapper/.snap-pac-pre c..... /etc/snapper/.snap-pac-pre
+..... /usr/bin/nano +..... /usr/bin/nano
+..... /usr/bin/rnano +..... /usr/bin/rnano
+..... /usr/share/doc/nano +..... /usr/share/doc/nano
+..... /usr/share/doc/nano/faq.html +..... /usr/share/doc/nano/faq.html
+..... /usr/share/doc/nano/fr +..... /usr/share/doc/nano/fr
+..... /usr/share/doc/nano/fr/nano.1.html +..... /usr/share/doc/nano/fr/nano.1.html
+..... /usr/share/doc/nano/fr/nanorc.5.html +..... /usr/share/doc/nano/fr/nanorc.5.html
+..... /usr/share/doc/nano/fr/rnano.1.html +..... /usr/share/doc/nano/fr/rnano.1.html
+..... /usr/share/doc/nano/nano.1.html
+..... /usr/share/doc/nano/nanorc.5.html
+..... /usr/share/doc/nano/rnano.1.html
c..... /usr/share/info/dir
+..... /usr/share/info/nano.info.gz
(I truncated the above output, but it continues...) You can also do `snapper
diff` in the same way---I'll spare you that one. I truncated the above output, but it continues. See the manpage for snapper to
see what each symbol means. You can also do `snapper diff` in the same
way—I'll spare you that one.
To undo the upgrade: To undo the upgrade:
# snapper -c root undochange 1033..1034 # snapper -c root undochange 1033..1034
create:0 modify:3 delete:100 create:0 modify:3 delete:100
And `nano` is now gone: And `nano` is now gone, along with all the files it changed:
$ pacman -Qi nano $ pacman -Qi nano
error: package 'nano' was not found error: package 'nano' was not found