45Drives / cephgeorep

An efficient unidirectional remote backup daemon for CephFS.
GNU Lesser General Public License v2.1
58 stars 12 forks source link

Files and folders not in source dir are copied to destination. #45

Open p3net opened 2 years ago

p3net commented 2 years ago

Hello,

i am currently having the following issue:

Files and folders not in source dir are copied to destination.

here is a snipet of the config:

# local backup settings
Source Directory = /mnt/ceph           # path to the ceph directory you want backed up
Ignore Hidden = false         # ignore files beginning with "."
Ignore Windows Lock = true    # ignore files beginning with "~$"
Ignore Vim Swap = true        # ignore vim .swp files (.<filename>.swp)

# remote settings
Destination =  <removed because of ips>               # one or more backup targets (failover only)
# list of destinations can be space or comma separated and Destination can be
# defined multiple times to append more failover targets.
# Destination format: [[user@]host:][path]
# Destination = root@backup-gw1:/tank/backup,root@backup-gw2:/tank/backup

# daemon settings
Exec = rsync                  # program to use for syncing - rsync or scp
Flags = -a --relative -z        # execution flags for above program (space delim)
Metadata Directory = /var/lib/cephgeorep/ # put metadata on the ceph cluster if
                                          # you want to use pacemaker with
                                          # redundant gateways

It will start copying the files from the source and will then start to copy files from /root and then /.

So it will copy /mnt/ceph then files in /root and then everything in / this includes /root and /mnt/ceph.

This only happens when it is started via the service. When using cephfssyncd from the cli the issue does not occur.

p3net commented 2 years ago

Correction:

When running from the CLI it will copy the contents of /root and the /snap dir

p3net commented 2 years ago

ah i forgot. I´m running Ubuntu 20.04 with the latest matching release

joshuaboud commented 2 years ago

Can you show what your destination field looks like and just change the IP addresses to 0.0.0.0? Just to make sure it is correct

p3net commented 2 years ago

Hey, thanks for the quick response.

This is the config snippet regarding destination:

Destination = root@0.0.0.0:/mnt/lfs/cephfsbackup

The rsync is working. I copied the whole cephfs contents already.

It just copies to much.

When starting the daemon via cli the contents of /root are being copied and when starting via systemd the contents of /root and /

joshuaboud commented 2 years ago

This is very mind boggling. I will attempt to recreate this but I have never seen this before. Do you have any symbolic links in your source directory that point out of /mnt/ceph? Mind you, cephgeorep should not be following any links but it may be a clue.

p3net commented 2 years ago

Thanks but i don´t have any symlinks in the source dir. It is an empty folder that the cephfs is mounted to. So just the files that are actually on the cephfs.

Cephgeorep is running in an vm that has the cephfs mounted at /mnt/ceph