Gitlab Configuring Data scheduled backups

Source: Internet
Author: User
Tags rsync

In the past, we were Gitlab Docker plus a large directory on the local disk to run. However, the data backup is very important, or in case the data is not in the day, afraid of fear in the event.

How to back up, we can choose timing, how a timing method, as follows:

# Gitlab Scheduled Backup * * * *
cd/opt/gitlab/&& rsync-avzp. soft.ops.ac.cn::opsbak/gitlab/0800/1>/var/log/r Sync.0800.log 2>&1 * * *
cd/opt/gitlab/&& rsync-avzp. SOFT.OPS.AC.CN::OPSBAK/GITLAB/2000/1&G T;/var/log/rsync.2000.log 2>&1
*/7 * * cd/opt/gitlab/&& rsync-avzp. Soft.ops.ac.cn::opsbak/gi Tlab/1w/1>/var/log/rsync.1w.log 2>&1
*/30 * * cd/opt/gitlab/&& rsync-avzp. soft.ops.ac.cn :: Opsbak/gitlab/1m/1>/var/log/rsync.1m.log 2>&1
Rsync Server Configuration
[Opsbak]
    Path =/data/bak/
    hosts allow = 0.0.0.0/0
    list = yes
    uid = root
    gid = root
    read = False
    log File =/var/log/rsyncd.opsbak.log

So after one months, we've got 4 backups.
* Every morning 8 o'clock
* Daily 8 o'clock in the evening
* 3 o'clock in the morning per week
* Every month 3 o'clock in the morning

But this place has a parameter is not afraid to use, is –delete, because this parameter means that if the file is deleted in the source directory, then the B directory will also do this action, meaning that the target and the source is fully synchronized.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.