Skip to content

Commit

Permalink
Merge branch 'release/1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
singularo committed Jan 5, 2021
2 parents ed67d8b + 9410cc5 commit b891cfd
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 4 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2020-01-05 - 1.0
### Changed
- use different path for each script
- quiet commands down but add error outputs
- renamed backup all command

### Added
- extra commands to sp
- syslog setup and logging
- restic pruning script
- restic prune all script
- restic prune parameters

### Fixed
- fixed invalid calls in sp

### Removed
- docker logins that were not required
9 changes: 7 additions & 2 deletions bin/sp_backup
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,20 @@ if [ ! -f /shared/restic/CACHEDIR.TAG ]; then
restic init || echo "# ERROR - Restic init failed"
fi
echo "# Processing backup for ${SITE}"
# Dump the mysql database.
echo "# Dumping database"
vendor/bin/drush sql-dump --result-file=/shared/sql/${SITE}.sql || echo "# ERROR - Drush sql dump failed"
vendor/bin/drush sql-dump \
--result-file=/shared/sql/${SITE}.sql \
--quiet || echo "# ERROR - Drush sql dump failed"
# Backup the files.
echo "# Backing up all data"
restic backup /shared \
--exclude=/shared/tmp \
--exclude=/shared/restic || echo "# ERROR - Restic backup failed"
--exclude=/shared/restic \
--quiet || echo "# ERROR - Restic backup failed"
EOF

chmod +x ${BACKUP_FILE}
Expand Down
2 changes: 1 addition & 1 deletion bin/sp_backup_all
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

for i in $(sp_list)
do
sp_backup $i
timeout 5m sp_backup $i
done
2 changes: 2 additions & 0 deletions bin/sp_prune
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ if [ ! -f /shared/restic/CACHEDIR.TAG ]; then
exit
fi
echo "# Processing snapshot prune for ${SITE}"
# Process the forget/prune based on the settings.
echo "# Running forget"
restic forget \
Expand Down
2 changes: 1 addition & 1 deletion bin/sp_prune_all
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

for i in $(sp_list)
do
sp_prune $i
timeout 20m sp_prune $i
done
File renamed without changes.

0 comments on commit b891cfd

Please sign in to comment.