Skip to content

Commit

Permalink
zip snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardofcgo committed May 8, 2021
1 parent e675dcd commit 8f8b018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ services:
- ./etc/group:/opt/etc/group
- ./etc/gshadow:/opt/etc/gshadow
- ./snapshots:/snapshots
restart: unless-stopped
discord:
build:
context: .
Expand All @@ -36,4 +35,3 @@ services:
- ./src:/src
- ./home:/home
- ./config:/config
restart: unless-stopped
7 changes: 4 additions & 3 deletions scripts/snapshot.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash

now=$(date +"%d-%m-%Y_%T")
destination=/snapshots/${now}
now=$(date +"%Y-%m-%d_%H_%M_%S")
destination=/snapshots/${now}.zip

cp -a /home/. $destination
cd home
zip -r $destination .

echo "Snapshot saved at $destination"

0 comments on commit 8f8b018

Please sign in to comment.