Safe to delete postgresqldumps?
I'm trying to do some storage cleanup (I've moved some apps from internal disk to external storage, got some what seem like orphan backup files) as I'm a little short on storage atm.
I've got 5-6 apps with a pretty large (+ 2G) postgresqldump files located in directories as:
Am I safe to rm -rf these, since I'm thinking they're dumps?
@ei8fdb safe to delete, but they are part of the "backup" procedure. The backup system takes a dump and uploads the dump. After the dump is uploaded, it's just left around to "reserve" space for future backups. It will get created again though each time a backup runs.
The backup system takes a dump and uploads the dump. After the dump is uploaded, it's just left around to "reserve" space for future backups.
Thanks @girish, so to make sure I understand:
Scenario: backup dated 20220215 with an associated dump file
- I delete the dump file, then decide to backup from that's date - restore will fail?
There's only one postgresqldump file in each directory so it's probably safer that I keep them there and look for other stuff I can delete, right?
Like my cat pictures....
I delete the dump file, then decide to backup from that's date - restore will fail?
No, a copy a the postgresql file is in the backup. The file at
/home/yellowtent/platformdata/<appid>/postgresqldumpis a temporary file. When we want to backup an app, we create a dump from postgresql and save it to that file. Then we upload that file to wherever the backup is located . After the backup is done, that file has no real use but we just keep it around because in some rare cases where you don't have backups it can help in recovery.
So, to summarize:
- Safe to delete
/home/yellowtent/appsdata/app-container-id/postgresqldump. But this will be created as part of the backup process, so it's going to be a pain. You have to delete this file everyday.
- Your final backup location will have a copy of the above file. Under
<timestamp>/appid/postgresqldump. This is your backup, don't delete this file!
- Safe to delete