Closed evgeni closed 1 year ago
restic@discourse01:~$ restic forget --host discourse01.theforeman.org --prune --keep-last 1
enter password for repository:
repository 99b92e2e opened (version 1)
Applying Policy: keep 1 latest snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths
------------------------------------------------------------------------------------------------------------------------------
f1e7e85b 2023-09-29 07:45:07 discourse01.theforeman.org last snapshot /var/discourse/containers
/var/discourse/shared/standalone/backups
------------------------------------------------------------------------------------------------------------------------------
1 snapshots
remove 14 snapshots:
…
root@discourse01:/var/discourse# shutdown -h now
Connection to 51.15.80.162 closed by remote host.
VM, Storage, IP have been deleted.
[restic@discourse01 ~]$ restic snapshots
enter password for repository:
repository 99b92e2e opened (version 1)
ID Time Host Tags Paths
----------------------------------------------------------------------------------------------------------------------
f1e7e85b 2023-09-29 07:45:07 discourse01.theforeman.org /var/discourse/containers
/var/discourse/shared/standalone/backups
d0083f01 2023-09-29 08:13:27 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
e5462962 2023-09-30 00:01:32 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
89bccf70 2023-10-01 00:01:31 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
29c29086 2023-10-02 00:01:32 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
cdd52af6 2023-10-03 00:01:32 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
04501448 2023-10-04 00:01:31 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
edfb3936 2023-10-05 00:01:33 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
----------------------------------------------------------------------------------------------------------------------
8 snapshots
[restic@discourse01 ~]$ restic forget --prune f1e7e85b
enter password for repository:
repository 99b92e2e opened (version 1)
[0:00] 100.00% 1 / 1 files deleted
1 snapshots have been removed, running prune
loading indexes...
loading all snapshots...
finding data that is still in use for 7 snapshots
[0:00] 100.00% 7 / 7 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:08] 100.00% 589 / 589 packs processed
to repack: 30 blobs / 503.640 KiB
this removes: 9 blobs / 136.544 KiB
to delete: 1347 blobs / 1.946 GiB
total prune: 1356 blobs / 1.946 GiB
remaining: 5411 blobs / 7.707 GiB
unused size after prune: 0 B (0.00% of remaining size)
repacking packs
[0:00] 100.00% 1 / 1 packs repacked
rebuilding index
[0:00] 100.00% 470 / 470 packs processed
deleting obsolete index files
[0:00] 100.00% 4 / 4 files deleted
removing 120 old packs
[0:00] 100.00% 120 / 120 files deleted
done
[restic@discourse01 ~]$ restic snapshots
enter password for repository:
repository 99b92e2e opened (version 1)
ID Time Host Tags Paths
----------------------------------------------------------------------------------------------------------------------
d0083f01 2023-09-29 08:13:27 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
e5462962 2023-09-30 00:01:32 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
89bccf70 2023-10-01 00:01:31 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
29c29086 2023-10-02 00:01:32 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
cdd52af6 2023-10-03 00:01:32 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
04501448 2023-10-04 00:01:31 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
edfb3936 2023-10-05 00:01:33 discourse01.conova.theforeman.org /var/discourse/shared/standalone/backups
----------------------------------------------------------------------------------------------------------------------
7 snapshots
it's gone
This box used to host Discourse, but that was migrated in #1710
host=discourse01.theforeman.org
from the backup