User Tools

Site Tools


docu:csheet:dtproc:backups:borg_qstart

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docu:csheet:dtproc:backups:borg_qstart [2020/03/02 20:38]
admin created
docu:csheet:dtproc:backups:borg_qstart [2020/03/02 20:44] (current)
admin
Line 3: Line 3:
 \\ \\
 Before a backup can be made a repository has to be initialized: Before a backup can be made a repository has to be initialized:
- +<code bash>borg init --encryption=repokey /path/to/repo</code>
-borg init --encryption=repokey /path/to/repo+
  
 Backup the ~/src and ~/Documents directories into an archive called Monday: Backup the ~/src and ~/Documents directories into an archive called Monday:
- +<code bash>borg create /path/to/repo::Monday ~/src ~/Documents</code>
-borg create /path/to/repo::Monday ~/src ~/Documents+
  
 The next day create a new archive called Tuesday: The next day create a new archive called Tuesday:
 +<code bash>
 $ borg create --stats /path/to/repo::Tuesday ~/src ~/Documents $ borg create --stats /path/to/repo::Tuesday ~/src ~/Documents
  
Line 32: Line 30:
 Chunk index:                     132                  261 Chunk index:                     132                  261
 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
 +</code>
  
 List all archives in the repository: List all archives in the repository:
 +<code bash>
 $ borg list /path/to/repo $ borg list /path/to/repo
 Monday                               Mon, 2016-02-15 19:14:44 Monday                               Mon, 2016-02-15 19:14:44
 Tuesday                              Tue, 2016-02-16 19:15:11 Tuesday                              Tue, 2016-02-16 19:15:11
 +</code>
  
 List the contents of the Monday archive: List the contents of the Monday archive:
 +<code bash>
 $ borg list /path/to/repo::Monday $ borg list /path/to/repo::Monday
 drwxr-xr-x user   group          0 Mon, 2016-02-15 18:22:30 home/user/Documents drwxr-xr-x user   group          0 Mon, 2016-02-15 18:22:30 home/user/Documents
 -rw-r--r-- user   group       7961 Mon, 2016-02-15 18:22:30 home/user/Documents/Important.doc -rw-r--r-- user   group       7961 Mon, 2016-02-15 18:22:30 home/user/Documents/Important.doc
 +</code>
  
 Restore the Monday archive by extracting the files relative to the current directory: Restore the Monday archive by extracting the files relative to the current directory:
- +<code bash>borg extract /path/to/repo::Monday</code>
-borg extract /path/to/repo::Monday+
  
 Recover disk space by manually deleting the Monday archive: Recover disk space by manually deleting the Monday archive:
- +<code bash>borg delete /path/to/repo::Monday</code>
-borg delete /path/to/repo::Monday+
  
docu/csheet/dtproc/backups/borg_qstart.1583181492.txt.gz · Last modified: 2020/03/02 20:38 by admin