Deduplicating archiver with compression and encryption
$apt install borgbackup
$borg init --encryption=repokey-blake2 /mnt/backup
$borg create -v -s -p --stats /mnt/backup::"name of backup" ~/documents_to_save
$borg create -v -s -p --stats /mnt/backup::"name of backup" ~/documents_to_save
$borg list /mnt/backup
$borg list /mnt/backup::"name of backup"
$cd /your_directory_you_want
$borg extract /mnt/backup::"name of backup"
in this example : keep backups of 2 per days, 2 per weeks, 1 per month, 1 per year.
$borg prune -v -s --keep-within=2d --keep-weekly=2 --keep-monthly=-1 --keep-yearly=-1 /mnt/backup
$borg delete /mnt/backup::"name of backup"
$borg check -v /mnt/backup
$borg check -v --repair /mnt/backup