• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

Backing up the localhost (BackupPC server)

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 9次 | 进入软件测试论坛讨论

领测软件测试网

BackupPC FAQ: Backing up the localhost (BackupPC server)

  • Why backup the local host using BackupPC?
  • How do you setup the local host to backup?


Why backup the local host using BackupPC?

If you have multiple disks, some reserved for BackupPC, thenit makes sense to backup the remaining disks to BackupPC.

Even if you haven't installed dedicated disks for BackupPC's data,backing up the non-BackupPC parts of your file systems providesprotection from inadvertently deleted data.

Back to Top


How do you setup the local host to backup?

The three issues are:

  • Don't backup the BackupPC data directory! This recursion willsteadily fill up your disk. Make sure you set $Conf,$Conf or $Conf so that theBackupPC data directory is not backed up.
  • Decide on the $Conf, most likely tar, rsync or rsyncd.

    In some case, although not likely, you might need to set$Conf to 'localhost' if the XferMethod can'tcontact the host by regular host name.

  • If you want to use tar or rsync, you will need to run these programsas root (user id 0). This elevation of user privileges can be donewill ``ssh HOST -l root'' like any other client. But then ssh willneedlessly encrypt all the.network traffic, which is not necessaryin this case.

    Daniel Poelzleithner suggests the alternative of using sudo, so there isno overhead with ssh. For example:

        $Conf = '/usr/bin/sudo $tarPath -c -v -f - -C $shareName+ --totals';

    Then run visudo to give BackupPC permission to run sudo without apassword, but only be able to run the /bin/tar command. For example,add this line:

        backuppc ALL = NOPASSWD: /bin/tar

    Note that an attacker who can become the backuppc user can thenuse sudo to run /bin/tar as root. Importantly, this means they canwrite files anywhere on the file system by doing tar -x. Thisallows them to become root.

    If you want to be more cautious, you could create a short shell script(eg: tarCreate) that includes the create argument arguments from$Conf, eg:

        #!/bin/sh -f
    exec /bin/tar -c $*

    Make sure this script and all parent directories have no writepermission. Then remove the -c from $Conf and changethe tar path:

        $Conf = '/usr/bin/sudo /path/to/tarCreate -v -f - -C $shareName+ --totals';

    Finally, run visudo to change the allowed command to /path/to/tarCreate.

    In this case, a compromise of the backuppc user still allows the attackerto run tar -c. But this only allows them read access to files on theserver, which they already have access to simply by inspecting theBackupPC backup data directories.

    A similar setup with sudo can be used for rsync. See the SSH FAQ formore information.

    Back to Top

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网