#1 2020-07-09 14:16:37

sphen
Member
Registered: 2020-06-13
Posts: 45

Simple one-liner to purge old backups from repo

Thought I would share a simple oneliner I have used to purge old backups from the repo. This just uses unix find and modification date. example shows a purge of 7 day old or more backups.

find /path/to/repo -type d -maxdepth 1 -mtime +7 -print0 | xargs -0 -i /path/to/xsibackup --prune {}

Offline

#2 2020-07-10 16:17:34

admin
Administrator
Registered: 2017-04-21
Posts: 1,362

Re: Simple one-liner to purge old backups from repo

(c)XSIBackup-DC already includes a --prune feature. Anybody using this or any other shared code snippet does it at his own risk.

Offline

#3 2020-07-10 16:38:13

sphen
Member
Registered: 2020-06-13
Posts: 45

Re: Simple one-liner to purge old backups from repo

this is using the --prune feature. but yes understood on your warning

Offline

#4 2020-07-26 16:48:09

admin
Administrator
Registered: 2017-04-21
Posts: 1,362

Re: Simple one-liner to purge old backups from repo

We have discovered a bug that affects backups with a block size bigger than default (10M, 20M, 50M). Please switch to using 1MB blocks (default) and wait until we release a fix in v. 1.4.0.0 before using bigger block sizes

http://33hops.com/forum/viewtopic.php?id=783

Offline

Board footer