Duplicity Commands

Published: 2018-06-01, Updated: 2022-12-30

Links

Expurgo

Apagar todos os antigos backups mas deixar o ultimo

duplicity remove-all-but-n-full 1 --force  'file://./'

Excluindo arquivos do backup

duplicity -v 5 full --allow-source-mismatch --include-globbing-filelist include-exclude.txt \
  --no-encryption "/home/jenkins/jenkins_home" "file://./duplicity"
duplicity remove-older-than "1M" "file://./duplicity" 2>&1

include-exclude.txt

- /home/jenkins/jenkins_home/caches
- /home/jenkins/jenkins_home/.sdkman
- /home/jenkins/jenkins_home/.gradle

Fazendo backup

duplicity -v5 --no-encryption ./somedir rclone://someRcloneRemote:/backup-dir

Recuperando o backup

duplicity restore -v5 --no-encryption rclone://someRcloneRemote:/backup-dir ./somedir

Recuperar uma snapshot especĂ­fica

duplicity restore -v5 --no-encryption --force -t 2018-06-01T21:43:26 rclone://someRcloneRemote:/backup-dir ./restoreDir

Recuperar arquivo especifico

duplicity restore --no-encryption --file-to-restore bookmarks.db file://./ ./restore-dir/bookmarks.db

Snapshots

Mostrar todas as versoes de um backup

duplicity collection-status rclone://someRcloneRemote:/mageddo-backups/postgres

Mostrar arquivos de uma data especifica

duplicity list-current-files -t 2018-06-01T21:49:40 rclone://someRcloneRemote:/mageddo-backups/postgres

Mostrar datas dos backups feitos

$ duplicity collection-status file:///home/typer/Downloads/manager-01-20190729T025357Z-001/manager-01
Last full backup date: Sun Jul 28 23:13:09 2019
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive dir: /home/typer/.cache/duplicity/7817481918adf1ae1ab9bfa7addc74c1

Found 0 secondary backup chains.

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Sun Jul 28 23:13:09 2019
Chain end time: Sun Jul 28 23:26:05 2019
Number of contained backup sets: 14
Total number of contained volumes: 14
 Type of backup set:                            Time:      Num volumes:
                Full         Sun Jul 28 23:13:09 2019                 1
         Incremental         Sun Jul 28 23:14:06 2019                 1

Deletar arquivos mais velhos

duplicity remove-older-than 20m file:///mageddo-backups/{{ item.path | basename }} 2>&1

Time formats

TIME FORMATS
	duplicity uses time strings in two places.  Firstly, many of the files duplicity creates will have the time in their filenames in the w3 datetime format as described in a w3 note at http://www.w3.org/TR/NOTE-datetime.
	Basically they look like "2001-07-15T04:09:38-07:00", which means what it looks like.  The "-07:00" section means the time zone is 7 hours behind UTC.
	
	Secondly, the -t, --time, and --restore-time options take a time string, which can be given in any of several formats:
	
	1.     the string "now" (refers to the current time)
	
	2.     a sequences of digits, like "123456890" (indicating the time in seconds after the epoch)
	
	3.     A string like "2002-01-25T07:00:00+02:00" in datetime format
	
	4.     An interval, which is a number followed by one of the characters s, m, h, D, W, M, or Y (indicating seconds, minutes, hours, days, weeks, months, or years respectively), or a series of such pairs.  In this case the
	      string refers to the time that preceded the current time by the length of the interval.  For instance, "1h78m" indicates the time that was one hour and 78 minutes ago.  The calendar here is unsophisticated: a month is
	      always 30 days, a year is always 365 days, and a day is always 86400 seconds.
	
	5.     A date format of the form YYYY/MM/DD, YYYY-MM-DD, MM/DD/YYYY, or MM-DD-YYYY, which indicates midnight on the day in question, relative to the current time zone settings.  For instance, "2002/3/5", "03-05-2002", and
	      "2002-3-05" all mean March 5th, 2002.

duplicity, como usar duplicity, como fazer backup com duplicity, como fazer backup, como usar google drive como backup, como usar duplicity com rclone


Configurando o openbox do zero Syslog commands

Comments