sudo mount /media/mate/3TB-EXT4_BACKUP2 sudo borg list /media/mate/3TB-EXT4_BACKUP2/borgbackup/home sudo borg list /media/mate/3TB-EXT4_BACKUP2/borgbackup/entireDisk tail -f /media/mate/3TB-EXT4_BACKUP2/borgbackup/entireDisk.last_exec.txt sudo myscripts/backups/borg-create_entireDisk_encrypted.sh tail -f /media/mate/3TB-EXT4_BACKUP2/borgbackup/home.last_exec.txt sudo scripts/backups/borg-create_home_encrypted.sh
borg init --encryption=[none|repokey-blake2] [--make-parent-dirs] [--storage-quota QUOTA ] /path/to/repo
borg key export [--paper] [--qr-html] <REPO> /path/to/repokey.export
borg info /path/to/repo
borg create [--stats] /path/to/repo::<archivo> /path/files/tobe/backuped1 [path/files/tobe/backuped2]
–list
:‘A’ = regular file, added ‘M’ = regular file, modified ‘U’ = regular file, unchanged ‘E’ = regular file, an error happened while accessing/reading this file A lowercase character means a file type other than a regular file, borg usually just stores their metadata: ‘d’ = directory ‘b’ = block device ‘c’ = char device ‘h’ = regular file, hardlink (to already seen inodes) ‘s’ = symlink ‘f’ = fifo Other flags used include: ‘i’ = backup data was read from standard input (stdin) ‘-‘ = dry run, item was not backed up ‘x’ = excluded, item was not backed up ‘?’ = missing status code (if you see this, please file a bug report!)
borg list /path/to/repo
borg list /path/to/repo::<archivo>
borg info /path/to/repo
borg info /path/to/repo::<archivo>
borg extract /path/to/repo::<archivo>
borg mount /path/to/repo /mount/point
borg mount::<archivo> /path/to/repo /mount/point
borg umount /mount/point
borg export-tar /path/to/repo::<archivo> fichero.tar
--list --dry-run
borg prune \ --keep-daily 7 \ --keep-weekly 4 \ --keep-monthly 12 \ --keep-yearly 1 \ /path/to/repo
borg delete /path/to/repo::<archivo>
Failed to create/acquire the lock /path/to/repo/lock.exclusive (timeout). terminating with error status, rc 2
borg break-lock /path/to/repo
export BORG_REPO=ssh://username@example.com:2022/~/backup/main
export BORG_REPO=/path/to/repo
export BORG_PASSPHRASE='XYZl0ngandsecurepa_55_phrasea&&123'
P
indica el estilo de pattern a aplicar según la lista anteriorR
indica el/los root path ← permite omitir el path del backup en borg create+
incluye-
excluye → indicar **/
para archivos y directorios!
excluye recursivamente# "sh:" pattern style is the default, so the following line is not needed: P sh R / # can be rebuild - /home/*/.cache # they're downloads for a reason - /home/*/Downloads # susan is a nice person # include susans home + /home/susan # don't backup the other home directories - /home/* # don't even look in /proc ! /proc
--critical: work on log level CRITICAL --error: work on log level ERROR --warning: work on log level WARNING (default) --info, -v, --verbose: work on log level INFO --debug: enable debug output, work on log level DEBUG --debug-topic TOPIC: enable TOPIC debugging (can be specified multiple times). The logger path is borg.debug.<TOPIC> if TOPIC is not fully qualified. --progress, -p: show progress information --log-json: Output one JSON object per log line instead of formatted text. --lock-wait SECONDS: wait at most SECONDS for acquiring a repository/cache lock (default: 1). --show-version: show/log the borg version --show-rc: show/log the return code (rc) --umask M: set umask to M (local and remote, default: 0077) --remote-path PATH: use PATH as borg executable on the remote (default: “borg”) --remote-ratelimit RATE: set remote network upload rate limit in kiByte/s (default: 0=unlimited) --consider-part-files: treat part files like normal files (e.g. to list/extract them) --debug-profile FILE: Write execution profile in Borg format into FILE. For local use a Python-compatible file can be generated by suffixing FILE with “.pyprof”. --rsh RSH: Use this command to connect to the ‘borg serve’ process (default: ‘ssh’)
# Backup a remote host locally ("pull" style) using sshfs mkdir sshfs-mount sshfs root@example.com:/ sshfs-mount cd sshfs-mount borg create /path/to/repo::example.com-root-{now:%Y-%m-%d} . cd .. fusermount -u sshfs-mount