This shows you the differences between two versions of the page.
docu:csheet:dtproc:backups:borg_qstart [2020/03/02 20:38] – created admin | 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 / | |
- | $ borg init --encryption=repokey / | + | |
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 / | |
- | $ borg create / | + | |
The next day create a new archive called Tuesday: | The next day create a new archive called Tuesday: | ||
+ | <code bash> | ||
$ borg create --stats / | $ borg create --stats / | ||
Line 32: | Line 30: | ||
Chunk index: | Chunk index: | ||
------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||
+ | </ | ||
List all archives in the repository: | List all archives in the repository: | ||
+ | <code bash> | ||
$ borg list / | $ borg list / | ||
Monday | Monday | ||
Tuesday | Tuesday | ||
+ | </ | ||
List the contents of the Monday archive: | List the contents of the Monday archive: | ||
+ | <code bash> | ||
$ borg list / | $ borg list / | ||
drwxr-xr-x user | drwxr-xr-x user | ||
-rw-r--r-- user | -rw-r--r-- user | ||
+ | </ | ||
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 / | |
- | $ borg extract / | + | |
Recover disk space by manually deleting the Monday archive: | Recover disk space by manually deleting the Monday archive: | ||
- | + | <code bash>borg delete / | |
- | $ borg delete / | + | |