Join the community today
Become a Member

Beta Branch Centmin Mod Backups - Attic Deduplication Backups

Discussion in 'Beta release code' started by eva2000, Aug 18, 2015.

  1. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    Started to play with Attic deduplication backup tool and liking it's simplicity. Official FAQ at Frequently asked questions and Github Issues page. It's the most likely tool I will be using for any Centmin Mod specific backup routines, features and options (paid or unpaid) due to the outlined below feature benefits :)

    Attic Python 3.2 Requirements



    Attic requires Python 3.2+ but CentOS 6 defaults to Python 2.6 and CentOS 7 to Python 2.7. So I added Centmin Mod Addons to 123.09beta01 which are standalone bash shell scripts (which can run on 123.08stable too) that allow installing Python 3.2, 3.3 and 3.4.

    Technically, Centmin Mod .08 stable users can also use these updated and newly added Centmin Mod addon scripts by just manually grabbing them from 123.09beta01 repo too at centminmod/addons at 123.09beta01 · centminmod/centminmod · GitHub :)

    Install Python 3.4 on CentOS 6



    I am installing Python 3.4 for Attic on CentOS 6.7. If using Centmin Mod 123.08stable do the following below commands. If using 123.09beta01 do the centmin.sh menu option 23 submenu option 2 update method to get the addons/python34_install.sh file.

    Code:
    cd /usr/local/src/centminmod/addons
    wget -cnv https://github.com/centminmod/centminmod/raw/123.09beta01/addons/python34_install.sh
    chmod +x python34_install.sh
    ./python34_install.sh
    Then you're have IUS Community YUM repo support so can update python 3.4 via
    Code:
    yum -y update python34u python34u-devel python34u-pip python34u-setuptools python34u-tools --enablerepo=ius

    Installing Attic



    To install Attic download latest binary and symlink it.
    Code:
    curl https://attic-backup.org/downloads/releases/0.16/Attic-0.16-linux-x86_64.tar.gz | tar -C /usr/local/share/ -zxf -
    ln -s /usr/local/share/Attic-0.16-linux-x86_64/attic /usr/local/bin/attic
    Code:
    attic --help
    usage: attic [-h]
                 {serve,init,check,change-passphrase,create,extract,delete,list,mount,info,prune,help}
                 ...
    
    Attic 0.16 - Deduplicated Backups
    
    optional arguments:
      -h, --help            show this help message and exit
    
    Available commands:
      {serve,init,check,change-passphrase,create,extract,delete,list,mount,info,prune,help}

    Attic Usage



    To use follow quick start guide at Quick Start — Attic - Deduplicating Archiver 0.16 documentation and Usage — Attic - Deduplicating Archiver 0.16 documentation

    Documented examples

    Local repository
    Code:
    attic init /data/mybackuprepo.attic
    
    Remote repository
    Code:
    attic init user@hostname:mybackuprepo.attic
    
    Encrypted remote repository
    Code:
    attic init --encryption=passphrase user@hostname:mybackuprepo.attic
    For example I initialised Attic repository at /home/backupattic.attic
    Code:
    attic init /home/backupattic.attic
    output
    Code:
    attic init /home/backupattic.attic
    Initializing repository at "/home/backupattic.attic"
    Encryption NOT enabled.
    Code:
    ls -lah
    total 68K
    drwxr-xr-x  3 root root 4.0K Aug 18 00:27 .
    drwxr-xr-x. 7 root root 4.0K Aug 18 00:27 ..
    -rw-r--r--  1 root root  148 Aug 18 00:27 config
    drwxr-xr-x  3 root root 4.0K Aug 18 00:27 data
    -rw-r--r--  1 root root   31 Aug 18 00:27 hints.0
    -rw-r--r--  1 root root  41K Aug 18 00:27 index.0
    -rw-r--r--  1 root root   28 Aug 18 00:27 README
    I want to backup /home/nginx/domains/ to a Attic backup archive called nginxdomains

    Code:
    attic create /home/backupattic.attic::nginxdomains /home/nginx/domains/
    I can also run with --stats output, creating a new backup archive called nginxdomains2 for backing up /home/nginx/domains/

    Code:
    attic create --stats /home/backupattic.attic::nginxdomains2 /home/nginx/domains/
    ------------------------------------------------------------------------------
    Archive name: nginxdomains2
    Archive fingerprint: 81ec8107b105da97d28506738fc6f93c32eb249f52be445f36e9e8f38b53dcf8
    Start time: Tue Aug 18 00:30:11 2015
    End time: Tue Aug 18 00:30:11 2015
    Duration: 0.03 seconds
    Number of files: 11
    
                           Original size      Compressed size    Deduplicated size
    This archive:               19.97 kB              7.20 kB                216 B
    All archives:               39.93 kB             14.39 kB              7.41 kB
    ------------------------------------------------------------------------------
    Listing Attic backup archives
    Code:
    attic list /home/backupattic.attic
    nginxdomains                         Tue Aug 18 00:29:33 2015
    nginxdomains2                        Tue Aug 18 00:30:11 2015
    Listing contents of Attic backup archive named nginxdomains2
    Code:
    attic list /home/backupattic.attic::nginxdomains2
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com/backup
    drwxr-x--- nginx  nginx         0 Aug 16 23:52 home/nginx/domains/demodomain.com/log
    -rw-r--r-- root   root          0 Aug 16 23:52 home/nginx/domains/demodomain.com/log/access.log
    -rw-r--r-- root   root          0 Aug 16 23:52 home/nginx/domains/demodomain.com/log/error.log
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com/private
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com/public
    -rw-r----- nginx  nginx      1618 Aug 16 23:42 home/nginx/domains/demodomain.com/public/403.html
    -rw-r----- nginx  nginx      1610 Aug 16 23:42 home/nginx/domains/demodomain.com/public/404.html
    -rw-r----- nginx  nginx      2145 Aug 16 23:42 home/nginx/domains/demodomain.com/public/500.html
    -rw-r----- nginx  nginx      2125 Aug 16 23:42 home/nginx/domains/demodomain.com/public/502.html
    -rw-r----- nginx  nginx      2165 Aug 16 23:42 home/nginx/domains/demodomain.com/public/503.html
    -rw-r----- nginx  nginx      2135 Aug 16 23:42 home/nginx/domains/demodomain.com/public/504.html
    -rw-r----- nginx  nginx      2185 Aug 16 23:42 home/nginx/domains/demodomain.com/public/50x.html
    -rw-r----- nginx  nginx      1173 Aug 16 23:42 home/nginx/domains/demodomain.com/public/index.html
    -rw-r----- nginx  nginx      2192 Aug 16 23:42 home/nginx/domains/demodomain.com/public/maintenance.html
    Let's add a new domain newdomain.com to Nginx vhost

    Code:
    nv -d newdomain.com -s y -u ftpuser01
    Then backup /home/nginx/domains/ to a Attic backup archive called nginxdomains3

    Code:
    attic create --stats /home/backupattic.attic::nginxdomains3 /home/nginx/domains/
    Code:
    attic create --stats /home/backupattic.attic::nginxdomains3 /home/nginx/domains/
    ------------------------------------------------------------------------------
    Archive name: nginxdomains3
    Archive fingerprint: 19712a94abc9390cdba4da188f43b2f1d42417776471c938affe8eaf58a6ce85
    Start time: Tue Aug 18 00:51:13 2015
    End time: Tue Aug 18 00:51:13 2015
    Duration: 0.03 seconds
    Number of files: 22
    
                           Original size      Compressed size    Deduplicated size
    This archive:               39.80 kB             13.53 kB              1.61 kB
    All archives:               79.72 kB             27.92 kB              9.02 kB
    List backup archives
    Code:
    attic list /home/backupattic.attic
    nginxdomains                         Tue Aug 18 00:29:33 2015
    nginxdomains2                        Tue Aug 18 00:30:11 2015
    nginxdomains3                        Tue Aug 18 00:51:13 2015
    List Attic backup archive named nginxdomains3

    Code:
    attic list /home/backupattic.attic::nginxdomains3
    drwxr-x--- nginx  nginx         0 Aug 18 00:49 home/nginx/domains
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com/backup
    drwxr-x--- nginx  nginx         0 Aug 16 23:52 home/nginx/domains/demodomain.com/log
    -rw-r--r-- root   root          0 Aug 16 23:52 home/nginx/domains/demodomain.com/log/access.log
    -rw-r--r-- root   root          0 Aug 16 23:52 home/nginx/domains/demodomain.com/log/error.log
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com/private
    drwxr-x--- nginx  nginx         0 Aug 16 23:42 home/nginx/domains/demodomain.com/public
    -rw-r----- nginx  nginx      1618 Aug 16 23:42 home/nginx/domains/demodomain.com/public/403.html
    -rw-r----- nginx  nginx      1610 Aug 16 23:42 home/nginx/domains/demodomain.com/public/404.html
    -rw-r----- nginx  nginx      2145 Aug 16 23:42 home/nginx/domains/demodomain.com/public/500.html
    -rw-r----- nginx  nginx      2125 Aug 16 23:42 home/nginx/domains/demodomain.com/public/502.html
    -rw-r----- nginx  nginx      2165 Aug 16 23:42 home/nginx/domains/demodomain.com/public/503.html
    -rw-r----- nginx  nginx      2135 Aug 16 23:42 home/nginx/domains/demodomain.com/public/504.html
    -rw-r----- nginx  nginx      2185 Aug 16 23:42 home/nginx/domains/demodomain.com/public/50x.html
    -rw-r----- nginx  nginx      1173 Aug 16 23:42 home/nginx/domains/demodomain.com/public/index.html
    -rw-r----- nginx  nginx      2192 Aug 16 23:42 home/nginx/domains/demodomain.com/public/maintenance.html
    drwxr-x--- nginx  nginx         0 Aug 18 00:49 home/nginx/domains/newdomain.com
    drwxr-x--- nginx  nginx         0 Aug 18 00:49 home/nginx/domains/newdomain.com/backup
    drwxr-x--- nginx  nginx         0 Aug 18 00:51 home/nginx/domains/newdomain.com/log
    -rw-r--r-- root   nginx         0 Aug 18 00:51 home/nginx/domains/newdomain.com/log/access.log
    -rw-r--r-- root   nginx         0 Aug 18 00:51 home/nginx/domains/newdomain.com/log/error.log
    drwxr-x--- nginx  nginx         0 Aug 18 00:49 home/nginx/domains/newdomain.com/private
    drwxr-x--- nginx  nginx         0 Aug 18 00:49 home/nginx/domains/newdomain.com/public
    -rw-r----- nginx  nginx      1618 Aug 18 00:49 home/nginx/domains/newdomain.com/public/403.html
    -rw-r----- nginx  nginx      1610 Aug 18 00:49 home/nginx/domains/newdomain.com/public/404.html
    -rw-r----- nginx  nginx      2145 Aug 18 00:49 home/nginx/domains/newdomain.com/public/500.html
    -rw-r----- nginx  nginx      2125 Aug 18 00:49 home/nginx/domains/newdomain.com/public/502.html
    -rw-r----- nginx  nginx      2165 Aug 18 00:49 home/nginx/domains/newdomain.com/public/503.html
    -rw-r----- nginx  nginx      2135 Aug 18 00:49 home/nginx/domains/newdomain.com/public/504.html
    -rw-r----- nginx  nginx      2185 Aug 18 00:49 home/nginx/domains/newdomain.com/public/50x.html
    -rw-r----- nginx  nginx      1366 Aug 18 00:49 home/nginx/domains/newdomain.com/public/index.html
    -rw-r----- nginx  nginx      2192 Aug 18 00:49 home/nginx/domains/newdomain.com/public/maintenance.html
    Check the /home/backupattic.attic repository for corruption and consistency

    Code:
    attic check /home/backupattic.attic
    Starting repository check...
    Repository check complete, no problems found.
    Starting archive consistency check...
    Analyzing archive nginxdomains (1/3)
    Analyzing archive nginxdomains2 (2/3)
    Analyzing archive nginxdomains3 (3/3)
    Archive consistency check complete, no problems found.
    Delete Attic archive nginxdomains2 and list archives to check
    Code:
    attic delete /home/backupattic.attic::nginxdomains2
    Code:
    attic list /home/backupattic.attic
    nginxdomains                         Tue Aug 18 00:29:33 2015
    nginxdomains3                        Tue Aug 18 00:51:13 2015

    Attic Pruning



    Deserves it's own heading for finer grain management of Attic archive retention policies.

    Code:
    usage: attic prune [-h] [-v] [-n] [-s] [--keep-within WITHIN] [-H HOURLY]
                       [-d DAILY] [-w WEEKLY] [-m MONTHLY] [-y YEARLY] [-p PREFIX]
                       REPOSITORY
    
    Prune repository archives according to specified rules
    
    positional arguments:
      REPOSITORY            repository to prune
    
    optional arguments:
      -h, --help            show this help message and exit
      -v, --verbose         verbose output
      -n, --dry-run         do not change repository
      -s, --stats           print statistics for the deleted archive
      --keep-within WITHIN  keep all archives within this time interval
      -H HOURLY, --keep-hourly HOURLY
                            number of hourly archives to keep
      -d DAILY, --keep-daily DAILY
                            number of daily archives to keep
      -w WEEKLY, --keep-weekly WEEKLY
                            number of weekly archives to keep
      -m MONTHLY, --keep-monthly MONTHLY
                            number of monthly archives to keep
      -y YEARLY, --keep-yearly YEARLY
                            number of yearly archives to keep
      -p PREFIX, --prefix PREFIX
                            only consider archive names starting with this prefix
    Keep 7 end of day and 4 additional end of week archives:
    Code:
    attic prune /data/myrepo --keep-daily=7 --keep-weekly=4
    
    Same as above but only apply to archive names starting with "foo":
    Code:
    attic prune /data/myrepo --keep-daily=7 --keep-weekly=4 --prefix=foo
    
    Keep 7 end of day, 4 additional end of week archives, and an end of month archive for every month:
    Code:
    attic prune /data/myrepo --keep-daily=7 --keep-weekly=4 --keep-monthly=-1
    
    Keep all backups in the last 10 days, 4 additional end of week archives, and an end of month archive for every month:
    Code:
    attic prune /data/myrepo --keep-within=10d --keep-weekly=4 --keep-monthly=-1
    

    Attic Info



    Attic info command to find out info for a specific archive named nginxdomains3

    Code:
    attic info /home/backupattic.attic::nginxdomains3
    Name: nginxdomains3
    Fingerprint: 19712a94abc9390cdba4da188f43b2f1d42417776471c938affe8eaf58a6ce85
    Hostname: hostname
    Username: root
    Time: Tue Aug 18 00:51:13 2015
    Command line: attic create --stats /home/backupattic.attic::nginxdomains3 /home/nginx/domains/
    Number of files: 22
    
                           Original size      Compressed size    Deduplicated size
    This archive:               39.80 kB             13.53 kB              1.61 kB
    All archives:               59.75 kB             20.72 kB              8.81 kB

    Mounting an Attic Archive to Access Backup Files



    The Attic mount command allows you to mount an Attic archive so you can access the backup's contents.

    Mount archive nginxdomains3 on new directory created at /home/restore-mount
    Code:
    mkdir /home/restore-mount
    attic mount /home/backupattic.attic::nginxdomains3 /home/restore-mount
    Code:
    ls -lah /home/restore-mount/home/nginx/domains/
    total 2.0K
    drwxr-s--- 1 nginx nginx 0 Aug 18 00:49 .
    drwxr-xr-x 1 root  root  0 Aug 18 01:19 ..
    drwxr-x--- 1 nginx nginx 0 Aug 16 23:42 demodomain.com
    drwxr-s--- 1 nginx nginx 0 Aug 18 00:49 newdomain.com
    To unmount
    Code:
    fusermount -u /home/restore-mount

    Attic Extract



    Attic extract command Usage — Attic - Deduplicating Archiver 0.16 documentation

    Extract entire archive
    Code:
    attic extract /data/myrepo::my-files
    
    Extract entire archive and list files while processing
    Code:
    attic extract -v /data/myrepo::my-files
    
    Extract the "src" directory
    Code:
    attic extract /data/myrepo::my-files home/USERNAME/src
    
    Extract the "src" directory but exclude object files
    Code:
    attic extract /data/myrepo::my-files home/USERNAME/src --exclude '*.o'
    

    Attic Exclude Patterns



    Info on exclude patterns

    So to exclude Centmin Mod sites' /log files but keep the /log directory it would be

    Code:
    attic create /home/backupattic.attic::nginxdomains8 /home/nginx/domains --exclude '/home/nginx/domains/*/log/' -v
    /home/nginx/domains
    /home/nginx/domains/demodomain.com
    /home/nginx/domains/demodomain.com/backup
    /home/nginx/domains/demodomain.com/log
    /home/nginx/domains/demodomain.com/private
    /home/nginx/domains/demodomain.com/public
    /home/nginx/domains/demodomain.com/public/403.html
    /home/nginx/domains/demodomain.com/public/404.html
    /home/nginx/domains/demodomain.com/public/500.html
    /home/nginx/domains/demodomain.com/public/502.html
    /home/nginx/domains/demodomain.com/public/503.html
    /home/nginx/domains/demodomain.com/public/504.html
    /home/nginx/domains/demodomain.com/public/50x.html
    /home/nginx/domains/demodomain.com/public/index.html
    /home/nginx/domains/demodomain.com/public/maintenance.html
    So if you list archive nginxdomains8, you won't see the access.log and error.log

    Code:
    attic list /home/backupattic.attic::nginxdomains8                                                              
    drwxr-x--- nginx  nginx         0 Aug 10 20:26 home/nginx/domains
    drwxr-x--- nginx  nginx         0 Aug 10 20:26 home/nginx/domains/demodomain.com
    drwxr-x--- nginx  nginx         0 Aug 10 20:26 home/nginx/domains/demodomain.com/backup
    drwxr-x--- nginx  nginx         0 Aug 10 20:32 home/nginx/domains/demodomain.com/log
    drwxr-x--- nginx  nginx         0 Aug 10 20:26 home/nginx/domains/demodomain.com/private
    drwxr-x--- nginx  nginx         0 Aug 10 20:26 home/nginx/domains/demodomain.com/public
    -rw-r----- nginx  nginx      1618 Aug 10 20:26 home/nginx/domains/demodomain.com/public/403.html
    -rw-r----- nginx  nginx      1610 Aug 10 20:26 home/nginx/domains/demodomain.com/public/404.html
    -rw-r----- nginx  nginx      2145 Aug 10 20:26 home/nginx/domains/demodomain.com/public/500.html
    -rw-r----- nginx  nginx      2125 Aug 10 20:26 home/nginx/domains/demodomain.com/public/502.html
    -rw-r----- nginx  nginx      2165 Aug 10 20:26 home/nginx/domains/demodomain.com/public/503.html
    -rw-r----- nginx  nginx      2135 Aug 10 20:26 home/nginx/domains/demodomain.com/public/504.html
    -rw-r----- nginx  nginx      2185 Aug 10 20:26 home/nginx/domains/demodomain.com/public/50x.html
    -rw-r----- nginx  nginx      1173 Aug 10 20:26 home/nginx/domains/demodomain.com/public/index.html
    -rw-r----- nginx  nginx      2192 Aug 10 20:26 home/nginx/domains/demodomain.com/public/maintenance.html
     
    Last edited: Aug 20, 2015
    • Useful Useful x 2
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    As I said Attic is the most likely tool I will be using for any Centmin Mod specific backup routines, features and options (paid via premium membership or unpaid) due to the outlined above feature benefits. However, writing such scripts, routines backed by Attic, will most likely end up in future versions like Centmin Mod 123.09beta.

    For now, I've outlined the above overview of Attic deduplication backup tool, so folks can play with it themselves and report any issues or share any tips if you're already an Attic user ;)

    @Matt @RoldanLT @Steve Tozer @Tracy Perry @SneakyDave @hungphutho @pamamolf @deltahf @BamaStangGuy @Andy @KeVo @dorobo @sepulchre @Mask @BoostN @Jake @Daniel J. Lewis @jeffwidman :)
     
    Last edited: Aug 18, 2015
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
  4. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Amazing tool with a lot of features :)

    I hope to see it soon on Centminmod .09 beta :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    indeed testing a simple cron job and attic backup script for backing up /usr/local/nginx/conf and /home/nginx/domains folders

    Code:
    19 * * * * /root/tools/atticbackup.sh
    Code:
    attic list /home/backupattic.attic
    190815-163605-nginxdomains           Wed Aug 19 16:36:05 2015
    190815-163728-nginxdomains           Wed Aug 19 16:37:29 2015
    190815-164010-nginxdomains           Wed Aug 19 16:40:10 2015
    190815-164156-nginxdomains           Wed Aug 19 16:41:56 2015
    190815-164321-nginxdomains           Wed Aug 19 16:43:21 2015
    190815-171901-nginxdomains           Wed Aug 19 17:19:01 2015
    190815-181901-nginxdomains           Wed Aug 19 18:19:01 2015
    190815-191901-nginxdomains           Wed Aug 19 19:19:02 2015
    190815-201901-nginxdomains           Wed Aug 19 20:19:02 2015
    190815-211901-nginxdomains           Wed Aug 19 21:19:02 2015
    190815-221901-nginxdomains           Wed Aug 19 22:19:02 2015
    190815-231901-nginxdomains           Wed Aug 19 23:19:01 2015
    200815-001901-nginxdomains           Thu Aug 20 00:19:02 2015
    200815-011901-nginxdomains           Thu Aug 20 01:19:02 2015
    200815-021901-nginxdomains           Thu Aug 20 02:19:01 2015
    200815-031901-nginxdomains           Thu Aug 20 03:19:01 2015
    200815-041901-nginxdomains           Thu Aug 20 04:19:01 2015
    200815-051901-nginxdomains           Thu Aug 20 05:19:01 2015
    200815-061901-nginxdomains           Thu Aug 20 06:19:01 2015
    200815-071901-nginxdomains           Thu Aug 20 07:19:02 2015
    Code:
    attic list /home/backupattic-nginxconf.attic
    190815-163605-nginxconf              Wed Aug 19 16:36:05 2015
    190815-163728-nginxconf              Wed Aug 19 16:37:28 2015
    190815-164010-nginxconf              Wed Aug 19 16:40:10 2015
    190815-164156-nginxconf              Wed Aug 19 16:41:56 2015
    190815-164321-nginxconf              Wed Aug 19 16:43:21 2015
    190815-171901-nginxconf              Wed Aug 19 17:19:01 2015
    190815-181901-nginxconf              Wed Aug 19 18:19:01 2015
    190815-191901-nginxconf              Wed Aug 19 19:19:01 2015
    190815-201901-nginxconf              Wed Aug 19 20:19:02 2015
    190815-211901-nginxconf              Wed Aug 19 21:19:01 2015
    190815-221901-nginxconf              Wed Aug 19 22:19:01 2015
    190815-231901-nginxconf              Wed Aug 19 23:19:01 2015
    200815-001901-nginxconf              Thu Aug 20 00:19:01 2015
    200815-011901-nginxconf              Thu Aug 20 01:19:01 2015
    200815-021901-nginxconf              Thu Aug 20 02:19:01 2015
    200815-031901-nginxconf              Thu Aug 20 03:19:01 2015
    200815-041901-nginxconf              Thu Aug 20 04:19:01 2015
    200815-051901-nginxconf              Thu Aug 20 05:19:01 2015
    200815-061901-nginxconf              Thu Aug 20 06:19:01 2015
    200815-071901-nginxconf              Thu Aug 20 07:19:02 2015
    Code:
    attic info /home/backupattic.attic::200815-071901-nginxdomains
    Name: 200815-071901-nginxdomains
    Fingerprint: 09a2a6c19681a5c2fa40d124eced97889fa4d98d33680ef586446f865148638f
    Hostname: centminmod.com
    Username: root
    Time: Thu Aug 20 07:19:02 2015
    Command line: /usr/local/bin/attic create --stats /home/backupattic.attic::200815-071901-nginxdomains /home/nginx/domains --exclude /home/nginx/domains/*/log/
    Number of files: 18
    
                           Original size      Compressed size    Deduplicated size
    This archive:               39.36 kB             13.46 kB                261 B
    All archives:              787.18 kB            269.28 kB             12.79 kB
    Code:
    attic info /home/backupattic-nginxconf.attic::200815-071901-nginxconf
    Name: 200815-071901-nginxconf
    Fingerprint: ba950151b673a08dfc6569f0eee91a800e0403a0c8c079628ee1421d6bb0e66d
    Hostname: centminmod.com
    Username: root
    Time: Thu Aug 20 07:19:02 2015
    Command line: /usr/local/bin/attic create --stats /home/backupattic-nginxconf.attic::200815-071901-nginxconf /usr/local/nginx/conf --exclude /usr/local/nginx/logs/
    Number of files: 60
    
                           Original size      Compressed size    Deduplicated size
    This archive:              107.00 kB             40.49 kB                260 B
    All archives:                2.14 MB            809.79 kB             46.61 kB
    checking attic repository

    Code:
    attic check -v /home/backupattic.attic             
    Starting repository check...
    Repository check complete, no problems found.
    Starting archive consistency check...
    Analyzing archive 200815-031901-nginxdomains (1/84)
    Analyzing archive 200815-121901-nginxdomains (2/84)
    Analyzing archive 200815-041901-nginxdomains (3/84)
    Analyzing archive 210815-211901-nginxdomains (4/84)
    Analyzing archive 210815-071901-nginxdomains (5/84)
    Analyzing archive 210815-221901-nginxdomains (6/84)
    Analyzing archive 210815-031901-nginxdomains (7/84)
    Analyzing archive 210815-231901-nginxdomains (8/84)
    Analyzing archive 220815-171901-nginxdomains (9/84)
    Analyzing archive 220815-181901-nginxdomains (10/84)
    Analyzing archive 210815-151901-nginxdomains (11/84)
    Analyzing archive 210815-181901-nginxdomains (12/84)
    Analyzing archive 210815-011901-nginxdomains (13/84)
    Analyzing archive 220815-191901-nginxdomains (14/84)
    Analyzing archive 210815-191901-nginxdomains (15/84)
    Analyzing archive 230815-011901-nginxdomains (16/84)
    Analyzing archive 200815-011901-nginxdomains (17/84)
    Analyzing archive 200815-131901-nginxdomains (18/84)
    Analyzing archive 210815-081901-nginxdomains (19/84)
    Analyzing archive 210815-141901-nginxdomains (20/84)
    Analyzing archive 200815-021901-nginxdomains (21/84)
    Analyzing archive 210815-111901-nginxdomains (22/84)
    Analyzing archive 220815-131901-nginxdomains (23/84)
    Analyzing archive 220815-201901-nginxdomains (24/84)
    Analyzing archive 190815-211901-nginxdomains (25/84)
    Analyzing archive 200815-221901-nginxdomains (26/84)
    Analyzing archive 210815-051901-nginxdomains (27/84)
    Analyzing archive 220815-001901-nginxdomains (28/84)
    Analyzing archive 220815-071901-nginxdomains (29/84)
    Analyzing archive 220815-051901-nginxdomains (30/84)
    Analyzing archive 190815-191901-nginxdomains (31/84)
    Analyzing archive 210815-161901-nginxdomains (32/84)
    Analyzing archive 220815-211901-nginxdomains (33/84)
    Analyzing archive 220815-021901-nginxdomains (34/84)
    Analyzing archive 210815-131901-nginxdomains (35/84)
    Analyzing archive 200815-101901-nginxdomains (36/84)
    Analyzing archive 220815-081901-nginxdomains (37/84)
    Analyzing archive 210815-171901-nginxdomains (38/84)
    Analyzing archive 210815-201901-nginxdomains (39/84)
    Analyzing archive 220815-111901-nginxdomains (40/84)
    Analyzing archive 190815-171901-nginxdomains (41/84)
    Analyzing archive 220815-151901-nginxdomains (42/84)
    Analyzing archive 220815-221901-nginxdomains (43/84)
    Analyzing archive 200815-081901-nginxdomains (44/84)
    Analyzing archive 200815-051901-nginxdomains (45/84)
    Analyzing archive 200815-091901-nginxdomains (46/84)
    Analyzing archive 200815-211901-nginxdomains (47/84)
    Analyzing archive 220815-041901-nginxdomains (48/84)
    Analyzing archive 230815-001901-nginxdomains (49/84)
    Analyzing archive 200815-191901-nginxdomains (50/84)
    Analyzing archive 200815-111901-nginxdomains (51/84)
    Analyzing archive 220815-121901-nginxdomains (52/84)
    Analyzing archive 200815-231901-nginxdomains (53/84)
    Analyzing archive 190815-164321-nginxdomains (54/84)
    Analyzing archive 200815-061901-nginxdomains (55/84)
    Analyzing archive 200815-001901-nginxdomains (56/84)
    Analyzing archive 200815-071901-nginxdomains (57/84)
    Analyzing archive 220815-061901-nginxdomains (58/84)
    Analyzing archive 220815-231901-nginxdomains (59/84)
    Analyzing archive 220815-011901-nginxdomains (60/84)
    Analyzing archive 220815-101901-nginxdomains (61/84)
    Analyzing archive 190815-221901-nginxdomains (62/84)
    Analyzing archive 200815-151901-nginxdomains (63/84)
    Analyzing archive 210815-101901-nginxdomains (64/84)
    Analyzing archive 190815-201901-nginxdomains (65/84)
    Analyzing archive 190815-231901-nginxdomains (66/84)
    Analyzing archive 210815-121902-nginxdomains (67/84)
    Analyzing archive 210815-001901-nginxdomains (68/84)
    Analyzing archive 200815-181901-nginxdomains (69/84)
    Analyzing archive 210815-021901-nginxdomains (70/84)
    Analyzing archive 210815-091901-nginxdomains (71/84)
    Analyzing archive 220815-031901-nginxdomains (72/84)
    Analyzing archive 210815-041901-nginxdomains (73/84)
    Analyzing archive 200815-161901-nginxdomains (74/84)
    Analyzing archive 190815-181901-nginxdomains (75/84)
    Analyzing archive 210815-061901-nginxdomains (76/84)
    Analyzing archive 220815-141901-nginxdomains (77/84)
    Analyzing archive 220815-091901-nginxdomains (78/84)
    Analyzing archive 200815-171901-nginxdomains (79/84)
    Analyzing archive 220815-161901-nginxdomains (80/84)
    Analyzing archive 200815-201901-nginxdomains (81/84)
    Analyzing archive 230815-021901-nginxdomains (82/84)
    Analyzing archive 230815-031901-nginxdomains (83/84)
    Analyzing archive 200815-141901-nginxdomains (84/84)
    Archive consistency check complete, no problems found.
     
    Last edited: Aug 23, 2015
    • Like Like x 1
  6. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Any E.T.A for this one ? :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    long way off.. currently quite busy with paid client work heh
     
  8. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Confused a bit with the Attic pruning.....

    1)How can i set it to keep only the 5 latest (most new) daily backups always?

    2)I want to try to backup only the public folder of my domain so i did:

    Code:
    cd  /home/nginx/domains/mydomain.com
    and then i did:

    Code:
    attic create /backup/backupattic.attic::mydomain /public/
    and i got this:

    Code:
    attic: /public: [Errno 2] No such file or directory: '/public'
     
    Last edited: Sep 4, 2015
  9. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    1) Read Usage — Attic - Deduplicating Archiver 0.16 documentation for --keep-within option
    2). Again from Usage — Attic - Deduplicating Archiver 0.16 documentation specifically attic prune section, source directories to backup I believe are either relative or full path format only
     
  10. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    For the backup and extraction if i run this:

    Code:
    attic create /backup/backupattic.attic::mydomain /home/nginx/domains/mydomain.com/public/
    and then if i mount and run:

    Code:
    attic extract /backup/backupattic.attic::mydomain
    I am getting the path /home/nginx/domains.bla bla bla starting inside from the

    Code:
    /home/nginx/domains/mydomain.com
    like:

    Code:
    /home/nginx/domains/mydomain.com/home/nginx/domains and so on ...
     
  11. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    that's correct see 1st post example for mount command

    edit: okay i think it's because you used ending forward slash
    Code:
    attic create /backup/backupattic.attic::mydomain /home/nginx/domains/mydomain.com/public/
    instead of
    Code:
    attic create /backup/backupattic.attic::mydomain /home/nginx/domains/mydomain.com/public
    what does command show
    Code:
    attic list /backup/backupattic.attic::mydomain
     
  12. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Code:
    [root@server ~]# attic list /backup/backupattic.attic::mydomain
    drwxr-x--- nginx  nginx  0 Sep 02 18:03 home/nginx/domains/mydomain.com/public
    -rw-r--r-- nginx  nginx  54 Sep 02 18:02 home/nginx/domains/mydomain.com/public/3B6B8C0D442FE59E2901F666B21E3FF7.txt
    -rw-r----- nginx  nginx  74 Aug 28 13:19 home/nginx/domains/mydomain.com/public/index.html
     
  13. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    Yup that's normal and expected output
     
  14. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    But extracting is not normal :(

    I just try without the ending forward slash:

    Code:
    attic create /backup/backupattic.attic::mydomain4 /home/nginx/domains/mydomain.com/public
    and then:

    Code:
    attic list /backup/backupattic.attic::mydomain4
    drwxr-x--- nginx  nginx         0 Sep 04 11:35 home/nginx/domains/mydomain.com/public
    -rw-r--r-- nginx  nginx        54 Sep 02 18:02 home/nginx/domains/mydomain.com/public/3B6B8C0D442FE59E2901F666B21E3FF7.txt
    -rw-r----- nginx  nginx        74 Aug 28 13:19 home/nginx/domains/mydomain.com/public/index.html
    
    and then i delete the 3B6B8C0D442FE59E2901F666B21E3FF7.txt file and i run:

    Code:
    attic extract -v /backup/backupattic.attic::mydomain4
    home/nginx/domains/mydomain.com/public
    home/nginx/domains/mydomain.com/public/3B6B8C0D442FE59E2901F666B21E3FF7.txt
    home/nginx/domains/mydomain.com/public/index.html

    And for me this looks normal but the txt file is not in the public folder :(
     
  15. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
  16. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    ok thanks :)

    I open an issue there and i will do more tests in the weekend and i hope to find out why i have this extraction issue :)
     
    • Like Like x 1
  17. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Running before the extract command this "cd /" and all working :)

    But i want to avoid this command before extraction and i am looking for a way as i do not know a lot about paths .....
     
    Last edited: Sep 6, 2015
    • Informative Informative x 1
  18. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Also for this to work:

    Code:
    fusermount -u /home/restore-mount
    we must install fuse package:

    Code:
    yum install -y fuse
    Small details but they may help some users :)
     
    • Like Like x 1
  19. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    12:58 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    One last question:

    If i have a backup with 1gb data for example and then i want to mount it i will need extra 1gb disk space ?
     
  20. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:58 PM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah you might, I don't recall installing it myself heh

    and yes 1GB disk space would be needed AFAIK
     
    • Like Like x 1