Learn about Centmin Mod LEMP Stack today
Register Now

Sysadmin Backup

Discussion in 'System Administration' started by raciasolvo, Oct 18, 2016.

  1. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    12:06 PM
    Nginx 1.11.6
    MariaDB 10.0.27
    I am setting up a backup. For vhosts backup I use this dirs:
    Code (Text):
    - /home/nginx/domains/*/backup
    - /home/nginx/domains/*/log
    - /home/nginx/domains/*/public/wp-content/cache
    + /home/nginx/domains/${VHOSTNAME}
    + /usr/local/nginx/conf/${VHOSTNAME}*
    + /usr/local/nginx/conf/*/${VHOSTNAME}*
    + /root/tools/*_${VHOSTNAME}*
    + /root/.config/*/${VHOSTNAME}*
    - **

    duplicity format (DUPLICITY(1) manual page)
    rootpath=/, + is a include path, - is a exclude path
    + DB Backup
    + cron ?
    Have I any directory forgotten?


    For server I use:
    Code (Text):
    - /swapfile
    - /proc
    - /mnt
    - /tmp
    - /dev
    - /sys
    - /svr-setup
    - /var/tmp
    - /var/log
    - /usr/src
    - /usr/local/src
    - /usr/local/nginxbackup
    - /root/.cache
    - /root/centminlogs
    - /home/nginx/domains
    + **

    What do you think about this list? Do I need to remove or add a path? I need a small but full archive for recovery.
     
    Last edited: Oct 18, 2016
  2. Derek

    Derek Member

    47
    9
    8
    Aug 5, 2016
    Ratings:
    +22
    Local Time:
    5:06 AM
    /swapfile - you don't need this.
    /proc - No. This is runtime data that's generated automatically.
    /mnt - this is by definition data that is hosted elsewhere
    /tmp - why? If it's here it can be deleted without consequence.
    - /dev
    - /sys
    /svr-setup (no idea on this one)
    /var/tmp - No. Again, it's tmp data
    /var/log - you probably want your logs, but that depends. Would you care if you lots your old http and mail logs, or is it just something that takes up space?
    - /usr/src
    - /usr/local/src
    - /usr/local/nginxbackup
    - /root/.cache
    - /root/centminlogs
    - /home/nginx/domains
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    7:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    12:06 PM
    Nginx 1.11.6
    MariaDB 10.0.27
    Thank you for answer. Yes, that paths I exclude from backup. "-" is "exclude path". Log files excluded too and:
    - /root/.cache - some tmp files
    - /usr/src - i see only kernels src
    - /usr/local/src - centminmod; For own src I use root/src
    - /usr/local/nginxbackup - centminmod nginx backups
    - /root/centminlogs - centminmod
    - /home/nginx/domains - separated backup for each vhost
    - /dev - runtime data ?
    - /sys - runtimedata ?
     
    Last edited: Oct 18, 2016
  5. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    12:06 PM
    Nginx 1.11.6
    MariaDB 10.0.27
  6. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    7:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes vhosts and related nginx files like nginx, php-fpm and persistent config file etc
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    7:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  8. raciasolvo

    raciasolvo Member

    98
    11
    8
    Oct 7, 2016
    Ratings:
    +28
    Local Time:
    12:06 PM
    Nginx 1.11.6
    MariaDB 10.0.27
  9. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    7:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+