make firefox backup a bit smaller
This commit is contained in:
parent
9eaf97ef0e
commit
8f4f86aa37
1 changed files with 21 additions and 17 deletions
|
@ -110,30 +110,34 @@ let
|
|||
name = name;
|
||||
source = home;
|
||||
target = backupHome;
|
||||
arguments = [
|
||||
"--exclude=Downloads"
|
||||
"--exclude=.cache"
|
||||
"--exclude=\".config/*chrom*/*cache\""
|
||||
"--exclude=\".config/*chrom*/Crash Reports\""
|
||||
"--exclude=\".config/*chrom*/Default/DawnCache\""
|
||||
"--exclude=\".config/*chrom*/Default/IndexedDB\""
|
||||
"--exclude=\".config/*chrom*/Default/Local Storage\""
|
||||
"--exclude=\".config/*chrom*/Default/Service Worker/CacheStorage\""
|
||||
"--exclude=\".config/*chrom*/Default/Storage\""
|
||||
"--exclude=\".config/*chrom*/Default/optimization_guide_prediction_model_downloads\""
|
||||
"--exclude=\".mozilla/firefox/*.default/*cache*\""
|
||||
"--exclude=\".mozilla/firefox/*.default/sessionstore-backups\""
|
||||
"--exclude=\".mozilla/firefox/*.default/storage-sync-v2.sqlite\""
|
||||
"--exclude=\".mozilla/firefox/*.default/storage/to-be-removed\""
|
||||
excludes = [
|
||||
"Downloads"
|
||||
".cache"
|
||||
".config/*chrom*/*cache"
|
||||
".config/*chrom*/Crash Reports"
|
||||
".config/*chrom*/Default/DawnCache"
|
||||
".config/*chrom*/Default/IndexedDB"
|
||||
".config/*chrom*/Default/Local Storage"
|
||||
".config/*chrom*/Default/Service Worker/CacheStorage"
|
||||
".config/*chrom*/Default/Storage"
|
||||
".config/*chrom*/Default/optimization_guide_prediction_model_downloads"
|
||||
".mozilla/firefox/*.default/*cache*"
|
||||
".mozilla/firefox/*.default/crashes"
|
||||
".mozilla/firefox/*.default/datareporting"
|
||||
".mozilla/firefox/*.default/sessionstore-backups"
|
||||
".mozilla/firefox/*.default/storage-sync-v2.sqlite"
|
||||
".mozilla/firefox/*.default/storage/temporary"
|
||||
".mozilla/firefox/*.default/storage/to-be-removed"
|
||||
".mozilla/firefox/Crash Reports"
|
||||
];
|
||||
};
|
||||
|
||||
createBackupScriptTemplate = { sudo, name, source, target, arguments ? [ ] }:
|
||||
createBackupScriptTemplate = { sudo, name, source, target, excludes ? [ ] }:
|
||||
pkgs.writers.writeBashBin "${name}-backup"
|
||||
''
|
||||
sudo -u ${sudo} \
|
||||
${tarBin} \
|
||||
${concatStringsSep " " arguments} \
|
||||
${concatStringsSep " " (map (pattern: "--exclude=\"${pattern}\"") excludes)} \
|
||||
--create \
|
||||
--verbos \
|
||||
--lzma \
|
||||
|
|
Loading…
Reference in a new issue