by halukakin · 4y ago · 0 comments
This requires the cooperation of the dbms software to get the on-disk data quiesced. Then your snapshot has to go fast enough that the dbms doesn't end up with too many spinning plates before you let it start writing normally.
0) make sure the the database data volume is on lvm or zfs
in a sql prompt:
1) BACKUP STAGE START; BACKUP STAGE BLOCK_COMMIT;
2) \! the shell command to take the snapshot
3) BACKUP STAGE END;
you can now mount your snapshot, copy it offsite and delete it. The restore procedure is left as an exercise!https://wiki.archlinux.org/title/Create_root_filesystem_snap...