17 Commits

Author SHA1 Message Date
daniel156161
cfc0ad1b48
fix backup.sh (find with type f for no zero byte files into archive) 2019-11-19 05:03:21 +01:00
Jeremy O'Brien
8c51936c13 fix: don't use $USERNAME as default username for backup/restore scripts, as this is usually defined on linux hosts as the current logged in user
Signed-off-by: Jeremy O'Brien <neutral@fastmail.com>
2019-11-15 07:59:32 -05:00
Aaron Bieber
1830a19b37
Remove '-w' as macOS doesn't have it. Fix var expansion in dash.
Signed-off-by: Aaron Bieber <aaron@bolddaemon.com>
2019-11-12 16:44:46 -07:00
Aaron Bieber
0b2c156d29
Make backup / restore use POSIX shell for portability.
backup.sh:
  - Add use getopts for a more friendly user interface.
  - Add timeout to ping check.
  - Add unix epoch to backup file names.
  - Backup ssh information (/etc/ssh, $USER/.ssh).

restore.sh:
  - Add use getopts for a more friendly user interface.
  - Add timeout to ping check.
  - If user doesn't specify a backup file to restore, attempt to
    find the latest for the host name passed in.

Signed-off-by: Aaron Bieber <aaron@bolddaemon.com>
2019-11-11 07:49:24 -07:00
Daniel Hoherd
7ca1168fed Ignore backup archives. Use 'find | xargs' to handle missing files. Correct file type in comments.
Signed-off-by: Daniel Hoherd <daniel.hoherd@gmail.com>
2019-11-09 17:20:42 -08:00
Simone Margaritelli
97a019fe25 new: implemented log rotation (closes #527) 2019-11-08 13:01:50 +01:00
Jeremy O'Brien
3efa96b292 enhancement: Improve the backup script
- Significantly decrease time it takes to save a backup
- Remove host dependency on 'zip' binary
- Preserve file attributes on backed-up files
- Avoid copying files on the pi itself to /tmp

Signed-off-by: Jeremy O'Brien <neutral@fastmail.com>
2019-10-31 14:02:07 -04:00
Ciara Brennan
0ad6e887ac check zip is installed first
Signed-off-by: Ciara Brennan <ciara.brennan@gmail.com>
2019-10-28 11:49:24 +00:00
Ben Lebherz
5119bf4326 quote shifting 2019-10-27 17:59:06 +01:00
Ben Lebherz
d5007385f3
add username option, .bashrc to backup files, implement shellcheck hints 2019-10-27 01:35:13 +02:00
Simone Margaritelli
546c7fe397 fix: chown backup file (fixes #409) 2019-10-26 17:15:42 +02:00
Simone Margaritelli
3ad426916f small refactoring to facilitate integration of the bond equation 2019-10-23 15:20:16 +02:00
Simone Margaritelli
c954bf8ffa fix: refactored backup.sh script to not require root login 2019-10-21 15:41:45 +02:00
Simone Margaritelli
6793312691
misc: small fix or general refactoring i did not bother commenting 2019-10-13 18:02:11 +02:00
Simone Margaritelli
223bce8abc fix: fixed paths in scripts/backup.sh 2019-10-08 19:29:22 +02:00
Simone Margaritelli
335e6b1311 backups 2019-10-03 15:55:03 +02:00
Simone Margaritelli
95b9d0ee1e readme config override 2019-10-03 15:02:08 +02:00