Re: Exclude files "older than X days" (ctime or mtime)
Denis Corbin <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Felix, in complement, to do exactly what you want using -af and -A options you could use the following helper script (which will be added to the dar packaged releases very soon): denis@terre > cat date_past_N_days #!/bin/bash if [ -z "$1" ] ; then echo "usage $0: <number of days>" echo " returns the date it was N days ago expressed as seconds since 1969" exit 1 fi echo $(( `date +%s` - $1 * 86400 )) denis@terre > and then use it with dar this way: dar -c <backup> -af -A `date_past_N_days 3` .... this will only save file that changed in the last three days Cheers, Denis On 07/02/2020 08:52, Denis Corbin wrote: > On 06/02/2020 20:16, Felix Leimbach wrote: >> Hello dar users, > > Hello Felix, > > >> I'm using dar to backup a dovecot mailserver (among other >> things) and want to limit backup size by only saving files >> (emails) created later than "today minus X days". > >> After reading the dar man page twice I haven't found an option >> to achieve that. Since dar has an option for EVERYTHING I'm sure >> I just haven't found it yet. > >> Thankful for any pointers, > > see -A option when used in conjunction of -af option, this should > address your need > > >> Cheers > >> Felix > > > > Cheers, Denis -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAl4+ifEACgkQCDGwvQPY sYJ3ig//YfluMN8GrBQFvGMRSN6Bs8T89Vzq8mgEKq3+lU0mT+o2mS/8GvGyar4l qynEHSdK3Z+ajd7cRfe4qicJeZRkv4GI5eyupfbICCEsN7v7y48H5Qf70LhfN7sX iB2zxc9Y59jB7iLXdfPTRZxMsGxhRyrGmMvkJFdgu47oN/Hh7MK8oTV+GkeOYWlB Jq4ce4VYpG6iIJz3ZQY1z8m3LxV6N5k/2xd0c3p5VN67C1w5kQTtqaDb1XzUo676 hmXMP8pVV94Dp/Qj7bBdwcARxtVib+tOXGi3qXh3rVkBIjNgHSlysso6wm1KniVb RdWxrRI+S4dCxDfaBkJGaj/XrvYYguWXdvKcF98R8laYEnT6mF3BBS6b23F0sCx3 qDihrR3UNFRnhRvO0J30uxqB55p+tZtOsIge2D32Z9f88enR6AI1eeAcqFP6maEZ PzeYK/Y3m3X3Rap6H61iD5JwG6XB19QbqLjScKvEZu0HxbEh/mejKiRYM8kinG5W +cjDj9j1TBRtviBRudaLnZkEv4Ws7bXUY+Rw7nOtAcKsEbSveN5WKs5t0IRbPQxf oZMY91CQt9y91WdlhjohmC+JVY7Cy//rqy+WGqfxx5j7nZvXu6BZBHIP5+40Fi0c jEBHKv83RSAEG5Pv7aYdnLvSMgJKKgQnX6mGF799BwdbDdYN6yE= =iGxS -----END PGP SIGNATURE-----