Skip to content

laperlej/backup-rotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backup Rotation

Rotate backup files based on file name pattern or last modified date

Usage

backup-rotation [OPTIONS] <FILES>...

Arguments

  • <FILES>... : The list of files to rotate.

Options

  • --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.

Format

  • The --format option allows you to define a custom format for the backup file names. The format string can include the following placeholders:

Required

  • %Y : Year
  • %m : Month
  • %d : Day
  • %H : Hour
  • %M : Minute
  • %S : Second

Optional

  • %z : Timezone (default is UTC)

Examples

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.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Contact

For any questions or feedback, please open an issue.

About

Cli tool to rotate backups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages