Add compression and name format
This commit is contained in:
parent
9126d08d33
commit
5ccc9709d8
@ -5,6 +5,8 @@
|
|||||||
borg_repo_path: "/var/backups/backup.borg/"
|
borg_repo_path: "/var/backups/backup.borg/"
|
||||||
borg_repo_encryption: "none"
|
borg_repo_encryption: "none"
|
||||||
borg_script_install_path: "/opt/borgbackup.sh"
|
borg_script_install_path: "/opt/borgbackup.sh"
|
||||||
|
borg_backup_name_format: "backup-$(date +%Y-%m-%d-%H:%M)"
|
||||||
|
borg_backup_compression: "lzma,6"
|
||||||
borg_backup_paths: "/etc /var"
|
borg_backup_paths: "/etc /var"
|
||||||
borg_exclude_paths: "--exclude={{borg_repo_path}} --exclude=*.log --exclude=*.log.gz"
|
borg_exclude_paths: "--exclude={{borg_repo_path}} --exclude=*.log --exclude=*.log.gz"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ REPOSITORY={{borg_repo_path}}
|
|||||||
|
|
||||||
echo "`date +[%F/%T]` Starting the backup"
|
echo "`date +[%F/%T]` Starting the backup"
|
||||||
# Create backup
|
# Create backup
|
||||||
borg create -v --compression lzma,6 --stats $REPOSITORY::$(date +%Y-%m-%d-%H:%M) {{borg_backup_paths}} {{borg_exclude_paths}}
|
borg create -v --compression {{borg_backup_compression}} --stats $REPOSITORY::{{borg_backup_name_format}} {{borg_backup_paths}} {{borg_exclude_paths}}
|
||||||
# Clean old backups
|
# Clean old backups
|
||||||
borg prune -v $REPOSITORY --keep-daily=3 --keep-weekly=2 --keep-monthly=12
|
borg prune -v $REPOSITORY --keep-daily=3 --keep-weekly=2 --keep-monthly=12
|
||||||
echo "`date +[%F/%T]` Done!"
|
echo "`date +[%F/%T]` Done!"
|
||||||
|
Loading…
Reference in New Issue
Block a user