Diskussion:Duply/Anwendung

Aus Foxwiki
Wechseln zu:Navigation, Suche

Verweiste/Unvollständige Duply Backups löschen

Posted on 11. March 2015 by bastelfreak

Manchmal zeigt duply list folgende Ausgabe:

1 -------------------------
2 Chain start time: Mon Mar  2 04:00:02 2015
3 Chain end time: Sat Mar  7 04:00:02 2015
4 Number of contained backup sets: 6
5 Total number of contained volumes: 199
6 Type of backup set:                            Time:      Num volumes:
7                Full         Mon Mar  2 04:00:02 2015               194
8         Incremental         Tue Mar  3 04:00:02 2015                 1
9         Incremental         Wed Mar  4 04:00:02 2015                 1
10         Incremental         Thu Mar  5 04:00:02 2015                 1
11         Incremental         Fri Mar  6 04:00:03 2015                 1
12         Incremental         Sat Mar  7 04:00:02 2015                 1
13 -------------------------
14 Also found 0 backup sets not part of any chain,
15 and 2 incomplete backup sets.
16 These may be deleted by running duplicity with the "cleanup" command.
17 --- Finished state OK at 02:00:56.586 - Runtime 00:00:01.884 ---

Dies sagt uns unter anderem dass es zwei Backups gibt die unvollständig oder veraltet sind. Zuerst einmal ist es interessant zu sehen welche Kommandos Duply überhaupt benutzt um an die unvollständigen Dumps zu kommen/sie zu löschen(duply cleanup --dryrun):

1 Start duply v1.9.1, time is 2015-03-08 02:04:28.
2 Using profile '/root/.duply/backup'.
3 Using installed duplicity version 0.6.24, python 2.7.9, gpg 1.4.18 (Home: ~/.gnupg), awk 'GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.2-p3, GNU MP 6.0.0)', bash '4.3.30(1)-release (x86_64-pc-linux-gnu)'.
4 Autoset found secret key of first GPG_KEY entry '*' for signing.
5 -- Run cmd -- Checking TEMP_DIR '/tmp' is a folder --
6 test -d /tmp 2>&1
7 -- Run cmd -- Checking TEMP_DIR '/tmp' is writable --
8 test -w /tmp 2>&1
9 TODO: reimplent tmp space check
10 -- Run cmd -- Test - Encrypt to '*' & Sign with '*' --
11 echo * | /usr/bin/gpg --sign --default-key * --passphrase-fd 0 --batch -r * --status-fd 1 -o /tmp/duply.2427.1425776669_ENC -e /usr/bin/duply 2>&1
12 -- Run cmd -- Test - Decrypt --
13 echo * | /usr/bin/gpg --passphrase-fd 0 --batch -o /tmp/duply.2427.1425776669_DEC -d /tmp/duply.2427.1425776669_ENC 2>&1
14 -- Run cmd -- Test - Compare --
15 test "$(cat '/usr/bin/duply')" = "$(cat '/tmp/duply.2427.1425776669_DEC')" 2>&1
16 Cleanup - Delete '/tmp/duply.2427.1425776669_*'(FAILED)
17
18 --- Start running command CLEANUP at 02:04:29.439 ---
19 TMPDIR='/tmp' PASSPHRASE=* FTP_PASSWORD=* duplicity cleanup --name duply_backup --encrypt-key * --sign-key * --verbosity '4' --full-if-older-than 1W --volsize 512 --asynchronous-upload 'ftp://user@*.de:21//webserver01'
20 --- Finished state OK at 02:04:29.523 - Runtime 00:00:00.083 ---

Um zu sehen was Duply löschen würde reicht ein einfaches duply cleanup. Schlussendlich können wir die Backups löschen mit dem Kommando duply backup cleanup --force:

view source print?

1 Start duply v1.9.1, time is 2015-03-08 02:05:35.
2 Using profile '/root/.duply/backup'.            
3 Using installed duplicity version 0.6.24, python 2.7.9, gpg 1.4.18 (Home: ~/.gnupg), awk 'GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.2-p3, GNU MP 6.0.0)', b
4 ash '4.3.30(1)-release (x86_64-pc-linux-gnu)'.  
5 Autoset found secret key of first GPG_KEY entry '*' for signing.
6 Checking TEMP_DIR '/tmp' is a folder (OK)       
7 Checking TEMP_DIR '/tmp' is writable (OK)       
8 TODO: reimplent tmp space check                 
9 Test - Encrypt to '*' & Sign with '*' (OK)
10 Test - Decrypt (OK)                             
11 Test - Compare (OK)                             
12 Cleanup - Delete '/tmp/duply.3373.1425776736_*'(OK)
13                                                  
14 --- Start running command CLEANUP at 02:05:36.778 ---
15 NcFTP version is 3.2.5                          
16 Local and Remote metadata are synchronized, no sync needed.
17 Warning, found incomplete backup sets, probably left from aborted session
18 Last full backup date: Mon Mar  2 04:00:02 2015 
19 Deleting these files from backend:              
20 duplicity-full.20140512T020004Z.vol1.difftar.gpg
21 duplicity-full.20140512T020004Z.vol2.difftar.gpg
22 .
23 .
24 .
25 duplicity-full.20140602T020005Z.vol99.difftar.gpg
26 duplicity-full.20140602T020005Z.vol100.difftar.gpg
27
28 --- Finished state OK at 02:07:43.568 - Runtime 00:02:06.789 ---
29 root@webserver01 ~ #