Rotate backup files based on file name pattern or last modified date
backup-rotation [OPTIONS] <FILES>...
- <FILES>... : The list of files to rotate.
- --format : Specify the format of the backup file name. If not provided, the last modified time of the file will be used.
- -h, --help : Print help information.
- -V, --version : Print version information.
- The --format option allows you to define a custom format for the backup file names. The format string can include the following placeholders:
- %Y : Year
- %m : Month
- %d : Day
- %H : Hour
- %M : Minute
- %S : Second
- %z : Timezone (default is UTC)
backup-rotation --format "%Y-%m-%d_%H-%M-%S" /path/to/backup/files/*
This command will rename and rotate the backup files based on the specified format.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
For any questions or feedback, please open an issue.