docker run -v '/home/:/data/source/' -v '/backup/:/data/destination/' raynigon/storebackup
Will create a Backup for the last 30 days of your '/home' folder to '/backup'. Take a look at the enviroment variables and check how to adjust them for your needs.
Take a look at http://www.nongnu.org/storebackup/en/ to get in touch with the underlying storebackup configuration
- SERIES_NAME: The Name of this Series (default: default)
- BACKUP_DURATION: The Amount of time how long the Backups should be keept (default: 30d)
- BACKUP_DURATION_FIRST_OF_WEEK: How long the first backup of a week should be stored(default: 30d)
- BACKUP_DURATION_FIRST_OF_MONTH: How long the first backup of a month should be stored(default: 30d)
- BACKUP_DURATION_DUPLICATES: How long backups of the same day should be stored(default: 7d)
- BACKUP_MIN_NUMBER: Minimal number of Backups which should be keept (default: 1)
- BACKUP_MAX_NUMBER: Maximal number of Backups which should be keept (default: 999999)
- EXCLUDE_DIRS: Relative Paths of Dirs which should not be backuped
Example:
docker run \
-v '/home/:/data/source/' \
-v '/backup/:/data/destination/' \
-e BACKUP_DURATION=90d \
-e BACKUP_DURATION_FIRST_OF_WEEK=365d \
-e BACKUP_MIN_NUMBER=120 \
raynigon/storebackup
Will backup your data for the last 90 days. There will be at least 120 backups and the first backup of a week will be saved for a year.
You can use the container also with Docker Compose.
Example:
storebackup:
image: raynigon/storebackup
container_name: StoreBackup
restart: always
volumes:
- '/home/:/data/source/'
- '/backup/:/data/destination/'
environment:
- SERIES_NAME=Home
- BACKUP_DURATION_FIRST_OF_WEEK=120d
- BACKUP_DURATION_FIRST_OF_MONTH=120d
- BACKUP_DURATION_DUPLICATES=3d
- BACKUP_MIN_NUMBER=15