user333 revised this gist 2 weeks ago. Go to revision
1 file changed, 1 insertion
note.md
| @@ -1,2 +1,3 @@ | |||
| 1 | 1 | `backup_site.sh` is located in `/root/` | |
| 2 | + | ||
| 2 | 3 | `recompress.sh` is located in `/mnt/sda/site-backups/` | |
user333 revised this gist 2 weeks ago. Go to revision
3 files changed, 17 insertions
backup_site.sh(file created)
| @@ -0,0 +1,11 @@ | |||
| 1 | + | #!/bin/bash | |
| 2 | + | ||
| 3 | + | cd /srv/http/ | |
| 4 | + | FILENAME="user333.sweeux.org-`date '+%s'`.tar" | |
| 5 | + | ||
| 6 | + | tar -cf ${FILENAME} user333.sweeux.org/ | |
| 7 | + | chown user ${FILENAME} | |
| 8 | + | zstd --rm -3 ${FILENAME} | |
| 9 | + | ||
| 10 | + | chown user ${FILENAME}.zst | |
| 11 | + | mv ${FILENAME}.zst /mnt/sda/site-backups/ | |
note.md(file created)
| @@ -0,0 +1,2 @@ | |||
| 1 | + | `backup_site.sh` is located in `/root/` | |
| 2 | + | `recompress.sh` is located in `/mnt/sda/site-backups/` | |
recompress.sh(file created)
| @@ -0,0 +1,4 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | ||
| 3 | + | zstd --rm -d *.tar.zst | |
| 4 | + | xz -ze9vT2 *.tar | |