backup_on_freebsd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
backup_on_freebsd [2019/02/06 08:05] – francesco | backup_on_freebsd [2020/04/19 22:11] (current) – francesco | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Sul server ks: | ||
+ | |||
< | < | ||
- | root@ks3367031: | + | root@ks****:/ |
- | -rwxr-xr-x | + | # / |
+ | # | ||
+ | # $FreeBSD: releng/ | ||
+ | # | ||
+ | SHELL=/ | ||
+ | PATH=/ | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | */ | ||
+ | # | ||
+ | # Save some entropy so that /dev/random can re-seed on boot. | ||
+ | */ | ||
+ | # | ||
+ | # Rotate log files every hour, if necessary. | ||
+ | 0 * * * * root newsyslog | ||
+ | # | ||
+ | # Perform daily/ | ||
+ | 1 3 * * * root periodic daily | ||
+ | 15 4 * * 6 root periodic weekly | ||
+ | 30 5 1 * * root periodic monthly | ||
+ | # | ||
+ | # Adjust the time zone if the CMOS clock keeps local time, as opposed to | ||
+ | # UTC time. See adjkerntz(8) for details. | ||
+ | 1, | ||
+ | |||
+ | |||
+ | 0 1 * * * root / | ||
+ | |||
+ | 45 13 * * * root / | ||
+ | |||
+ | 0 3 1 * * root / | ||
+ | |||
+ | 0 5 1 * * root / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | < | ||
+ | root@ks3367031: | ||
+ | ls: No match. | ||
+ | root@ks3367031: | ||
+ | -rwxr-xr-x | ||
+ | -rwxr-xr-x | ||
+ | -rwxr-xr-x | ||
</ | </ | ||
< | < | ||
root@ks3367031: | root@ks3367031: | ||
+ | #!/bin/sh | ||
+ | # Lo faccio eseguire da cron ogni sera. | ||
+ | # Cf. / | ||
+ | |||
+ | present=`date +' | ||
+ | |||
+ | tar --exclude=/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | root@ks3367031: | ||
#!/bin/sh | #!/bin/sh | ||
# Lo faccio eseguire da cron ogni sera alle 20. | # Lo faccio eseguire da cron ogni sera alle 20. | ||
- | present=`date +'%d-%B-%Y'` | + | present=`date +'%j_%Y'` |
- | tar --exclude=/ | + | tar -cvzf / |
</ | </ | ||
- | Dal NUC: | + | < |
+ | root@ks3367031: | ||
+ | #!/bin/sh | ||
+ | # Lo faccio eseguire da cron il primo giorno di ogni mese alle 3 di notte. | ||
+ | |||
+ | present=`date +' | ||
+ | |||
+ | tar -cvzf / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Dal NUC (non è necessario essere root): | ||
< | < | ||
- | $ ls -lh /home/ | + | $ crontab -e |
- | -rwxr-xr-x | + | |
+ | # @reboot / | ||
+ | |||
+ | 0 5 * * * / | ||
+ | |||
+ | 0 15 * * * / | ||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | $ ls -lh /usr/local/ | ||
+ | -rwxr-xr-x | ||
+ | -rwxr-xr-x | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ cat / | ||
+ | #!/bin/sh | ||
+ | # Lo faccio eseguire da cron ogni mattina alle 5. | ||
+ | |||
+ | present=`date +' | ||
+ | |||
+ | rsync ks:/ | ||
</ | </ | ||
< | < | ||
- | $ cat /home/francesco/dokuwiki_NUC.sh | + | $ cat /usr/local/bin/ |
#!/bin/sh | #!/bin/sh | ||
# Lo faccio eseguire da cron ogni mattina alle 5. | # Lo faccio eseguire da cron ogni mattina alle 5. | ||
- | present=`date +'%d-%B-%Y'` | + | present=`date +'%j_%Y'` |
- | rsync ks:/ | + | rsync ks:/ |
</ | </ |
backup_on_freebsd.1549436708.txt.gz · Last modified: 2019/02/06 08:05 by francesco