tvl-depot/users/grfn/system/home/modules/tarsnap.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.9 KiB
Nix
Raw Normal View History

2020-05-04 19:12:31 +02:00
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
tarsnap
];
home.file.".tarsnaprc".text = ''
### Recommended options
2020-05-04 19:12:31 +02:00
# Tarsnap cache directory
cachedir /home/grfn/.cache/tarsnap
2020-05-04 19:12:31 +02:00
# Tarsnap key file
keyfile /home/grfn/.private/tarsnap.key
2020-05-04 19:12:31 +02:00
# Don't archive files which have the nodump flag set.
nodump
2020-05-04 19:12:31 +02:00
# Print statistics when creating or deleting archives.
print-stats
2020-05-04 19:12:31 +02:00
# Create a checkpoint once per GB of uploaded data.
checkpoint-bytes 1G
2020-05-04 19:12:31 +02:00
### Commonly useful options
2020-05-04 19:12:31 +02:00
# Use SI prefixes to make numbers printed by --print-stats more readable.
humanize-numbers
2020-05-04 19:12:31 +02:00
### Other options, not applicable to most systems
2020-05-04 19:12:31 +02:00
# Aggressive network behaviour: Use multiple TCP connections when
# writing archives. Use of this option is recommended only in
# cases where TCP congestion control is known to be the limiting
# factor in upload performance.
#aggressive-networking
2020-05-04 19:12:31 +02:00
# Exclude files and directories matching specified patterns.
# Only one file or directory per command; multiple "exclude"
# commands may be given.
#exclude
2020-05-04 19:12:31 +02:00
# Include only files and directories matching specified patterns.
# Only one file or directory per command; multiple "include"
# commands may be given.
#include
2020-05-04 19:12:31 +02:00
# Attempt to reduce tarsnap memory consumption. This option
# will slow down the process of creating archives, but may help
# on systems where the average size of files being backed up is
# less than 1 MB.
#lowmem
2020-05-04 19:12:31 +02:00
# Try even harder to reduce tarsnap memory consumption. This can
# significantly slow down tarsnap, but reduces its memory usage
# by an additional factor of 2 beyond what the lowmem option does.
#verylowmem
2020-05-04 19:12:31 +02:00
# Snapshot time. Use this option if you are backing up files
# from a filesystem snapshot rather than from a "live" filesystem.
#snaptime <file>
2020-05-04 19:12:31 +02:00
'';
}