Skip to content

Question: Backup Prune ? #1

Open

Description

@leonorpw

Hello, is there any nice way to add something like to the build?

for i in $(ls $BORG_DATA_DIR/)
do
	echo "###### Pruning backup for $i on $(date) ######"
	borg prune -v $BORG_DATA_DIR/$i --keep-daily=7 --keep-weekly=4 --keep-monthly=6
done

I tried to add cron and run it, but i didn't get it working

Activity

  1. Nold360 commented on Dec 5, 2018

    @Nold360
    Owner

    Hi,

    this should definitely work, if you have borg installed on your host system & run this script via your hosts crontab. A cron inside of the container doesn't exist.

    Also i guess it's best practice to let your clients prune their repo. Otherwise you might lock the repo, when your client wants to backup.

  2. heavygale commented on Dec 15, 2018

    @heavygale

    @leonorpw: you might want to have a look at the "prune" branch in my fork. It's a "prune cronjob only"-version of the image with no ssh-server installed, so that the repokey passphrases are seperated from the regular container which is accessable via ssh.

    And I modified the "master" branch, so that it's possible to define certain sshkeys as "managers" (allowed to prune/delete archives), while all other sshkeys can still be restricted with "--append-only".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions