restic backup(1)                                              restic backup(1)



NNAAMMEE
       restic-rewrite - Rewrite snapshots to exclude unwanted files



SSYYNNOOPPSSIISS
       rreessttiicc rreewwrriittee [[ffllaaggss]] [[ssnnaappsshhoottIIDD ......]]



DDEESSCCRRIIPPTTIIOONN
       The  "rewrite"  command excludes files from existing snapshots. It cre‐
       ates new snapshots containing the same data as the original  ones,  but
       without  the  files  you  specify to exclude. All metadata (time, host,
       tags) will be preserved.


       The snapshots to rewrite are specified  using  the  --host,  --tag  and
       --path  options,  or  by  providing a list of snapshot IDs. Please note
       that specifying neither any of these options nor  a  snapshot  ID  will
       cause the command to rewrite all snapshots.


       The special tag 'rewrite' will be added to the new snapshots to distin‐
       guish them from the original ones, unless  --forget  is  used.  If  the
       --forget  option  is  used,  the  original  snapshots  will  instead be
       directly removed from the repository.


       Please note that the --forget option only removes the snapshots and not
       the  actual  data  stored  in the repository. In order to delete the no
       longer referenced data, use the "prune" command.



EEXXIITT SSTTAATTUUSS
       Exit status is 0 if the command was successful, and non-zero  if  there
       was any error.



OOPPTTIIOONNSS
       --nn, ----ddrryy--rruunn[=false]      do not do anything, just print what would be
       done


       --ee, ----eexxcclluuddee=[]      exclude a  ppaatttteerrnn  (can  be  specified  multiple
       times)


       ----eexxcclluuddee--ffiillee=[]      read exclude patterns from a ffiillee (can be speci‐
       fied multiple times)


       ----ffoorrggeett[=false]      remove original snapshots after creating new ones


       --hh, ----hheellpp[=false]      help for rewrite


       --HH, ----hhoosstt=[]      only consider snapshots for this hhoosstt (can be speci‐
       fied multiple times)


       ----iieexxcclluuddee=[]       same as --exclude ppaatttteerrnn but ignores the casing of
       filenames


       ----iieexxcclluuddee--ffiillee=[]      same as --exclude-file but  ignores  casing  of
       ffiilleenames in patterns


       ----ppaatthh=[]       only  consider snapshots including this (absolute) ppaatthh
       (can be specified multiple times)


       ----ttaagg=[]      only consider snapshots including ttaagg[[,,ttaagg,,......]]  (can  be
       specified multiple times)



OOPPTTIIOONNSS IINNHHEERRIITTEEDD FFRROOMM PPAARREENNTT CCOOMMMMAANNDDSS
       ----ccaacceerrtt=[]      ffiillee to load root certificates from (default: use sys‐
       tem certificates)


       ----ccaacchhee--ddiirr=""      set  the  cache  ddiirreeccttoorryy.  (default:  use  system
       default cache directory)


       ----cclleeaannuupp--ccaacchhee[=false]      auto remove old cache directories


       ----ccoommpprreessssiioonn=auto      compression mode (only available for repository
       format version 2), one of (auto|off|max)


       ----iinnsseeccuurree--ttllss[=false]      skip TLS certificate verification when con‐
       necting to the repository (insecure)


       ----jjssoonn[=false]       set  output mode to JSON for commands that support
       it


       ----kkeeyy--hhiinntt=""      kkeeyy ID of key  to  try  decrypting  first  (default:
       $RESTIC_KEY_HINT)


       ----lliimmiitt--ddoowwnnllooaadd=0       limits  downloads  to a maximum rraattee in KiB/s.
       (default: unlimited)


       ----lliimmiitt--uuppllooaadd=0      limits  uploads  to  a  maximum  rraattee  in  KiB/s.
       (default: unlimited)


       ----nnoo--ccaacchhee[=false]      do not use a local cache


       ----nnoo--lloocckk[=false]       do  not  lock  the repository, this allows some
       operations on read-only repositories


       --oo, ----ooppttiioonn=[]      set extended option (kkeeyy==vvaalluuee, can  be  specified
       multiple times)


       ----ppaacckk--ssiizzee=0       set target pack ssiizzee in MiB, created pack files may
       be larger (default: $RESTIC_PACK_SIZE)


       ----ppaasssswwoorrdd--ccoommmmaanndd=""      shell ccoommmmaanndd to obtain the repository pass‐
       word from (default: $RESTIC_PASSWORD_COMMAND)


       --pp,  ----ppaasssswwoorrdd--ffiillee=""       ffiillee to read the repository password from
       (default: $RESTIC_PASSWORD_FILE)


       --qq, ----qquuiieett[=false]      do not output comprehensive progress report


       --rr, ----rreeppoo=""      rreeppoossiittoorryy to backup to or  restore  from  (default:
       $RESTIC_REPOSITORY)


       ----rreeppoossiittoorryy--ffiillee=""       ffiillee  to  read  the repository location from
       (default: $RESTIC_REPOSITORY_FILE)


       ----ttllss--cclliieenntt--cceerrtt=""      path to a ffiillee  containing  PEM  encoded  TLS
       client certificate and private key


       --vv,  ----vveerrbboossee[=0]       be  verbose (specify multiple times or a level
       using --verbose=nn, max level/times is 2)



SSEEEE AALLSSOO
       rreessttiicc((11))



generated by rreessttiicc ggeenneerraattee       Jan 2017                   restic backup(1)
