forked from andonome/lk
make backups directory
This commit is contained in:
26
data/backups/archives.md
Normal file
26
data/backups/archives.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
title: "archives"
|
||||
tags: [ "Documentation", "backups" ]
|
||||
---
|
||||
# GPG Archives
|
||||
|
||||
Create an encrypted archive with `gpg`:
|
||||
|
||||
> tar czvpf - file1.txt file2.pdf file3.jpg | gpg --symmetric --cipher-algo aes256 -o myarchive.tar.gz.gpg
|
||||
|
||||
And extract it with `gpg`:
|
||||
|
||||
> gpg -d myarchive.tar.gz.gpg | tar xzvf -
|
||||
|
||||
# 7zip
|
||||
|
||||
Make archive:
|
||||
|
||||
> 7za a -tzip -pPASSWORD -mem=AES256 archive.zip file1 file2
|
||||
|
||||
Note that people can still see every filename in your archive, and can change those files.
|
||||
|
||||
Unzip:
|
||||
|
||||
> 7za e archive.zip
|
||||
|
67
data/backups/unison.md
Normal file
67
data/backups/unison.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: "unison"
|
||||
tags: [ "Documentation", "backups" ]
|
||||
---
|
||||
|
||||
# Local Sync
|
||||
|
||||
unison Dir_A Dir_B
|
||||
|
||||
Accept defaults with:
|
||||
|
||||
> unison -auto Dir_A Dir_B
|
||||
|
||||
Ask no questions with:
|
||||
|
||||
> unison -batch Dir_A Dir_B
|
||||
|
||||
# Remote Sync
|
||||
|
||||
Sync the folders ~/LK on pi and localhost with:
|
||||
|
||||
> unison LK ssh://pi@192.168.0.13/LK
|
||||
|
||||
|
||||
#Back Script Example
|
||||
Make backup script 'rat' by entering the configurations in ~/.unison/rat.prf
|
||||
|
||||
```{r}
|
||||
# Where to synchronize from
|
||||
root=/home/roach-1/
|
||||
|
||||
root=ssh://ubuntu@10.0.3.76/
|
||||
|
||||
auto = true
|
||||
batch = true
|
||||
## for ssh arguments, add as so:
|
||||
#sshargs=-p 4792
|
||||
|
||||
## Directories to synchronize
|
||||
## a path such as 'Album 1' will not work - don't use quotes.
|
||||
path=box 1
|
||||
path=box 2
|
||||
path=house
|
||||
path=.vimrc
|
||||
path=.bashrc
|
||||
|
||||
ignore=Name temp.*
|
||||
ignore=Name *.swp
|
||||
|
||||
## Merging
|
||||
## This line handles the merge, but it's based on Emacs, which cannot run in a tty, but requires X.
|
||||
|
||||
diff = diff -u CURRENT2 CURRENT1 | perl -pe 's/^\+/>/; s/^\-/</'
|
||||
```
|
||||
|
||||
# Scheduled Backups
|
||||
|
||||
A full backup can be run with:
|
||||
|
||||
> unison rat.prf
|
||||
|
||||
And a crontab can be set with:
|
||||
|
||||
* */4 * * * /usr/bin/unison rat
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user