Attic,一个备份工具

一直使用rsnyc,要么全量要么增量,初始化和管理并不够智能,刚刚在osc上看到一个新出来的应用,Attic

https://pythonhosted.org/Attic/quickstart.html#a-step-by-step-example

[shell]
#!/bin/sh
REPOSITORY=username@remoteserver.com:backup.attic

# Backup all of /home and /var/www except a few
# excluded directories
attic create --stats \
$REPOSITORY::hostname-`date +%Y-%m-%d` \
/home \
/var/www \
--exclude /home/*/.cache \
--exclude /home/Ben/Music/Justin\ Bieber \
--exclude *.pyc

# Use the `prune` subcommand to maintain 7 daily, 4 weekly
# and 6 monthly archives.
attic prune -v $REPOSITORY --daily=7 --weekly=4 --monthly=6
[/shell]

Remote repositories

Attic can initialize and access repositories on remote hosts as the host is accessible using SSH and Attic is installed.

The following syntax is used to address remote repositories:

[shell]$ attic init user@hostname:repository.attic[/shell]
or:

[shell]$ attic init ssh://user@hostname:port/repository.attic[/shell]

在需要备份的机器上安装并启用attic,就可以在其它地方还原数据。

1, 内容是除重的,没明白是啥意思,相同的图片在两个目录下存在,能做到只备份一处的文件就能在两个目录下还原?
2, 这过程感觉器上跟git一样一样的,算是加了filesystem加了监听,自动给git commit么?

还没有用过,mark一下。

发表评论