CE rsync backup

Before I start this, am I missing anything?
As per manual I’ll do mysqldump and then backup seafile data. Daily
Will do incremental

rsync -avzHP --delete data databases gogofc@172.22.85.119:/home/gogofc

Someone on the forum mentioned something about making sure garbage collector isn’t running.

Be aware: copying lots of data takes time. If some data changes on the server while the rsync is running, you have an inconsistent copy on the remote machine.

For seafile I would always use a filesystem that provides data integrity und can do snapshots, e.g. zfs or btrfs.

My backup approach is:

  1. backup databases
  2. make snapshot from seafile
  3. backup seafile data from snapshot to remote server

I don’t have ZFS on this VPS.
Let’s say it’s 100GB.

If I could do zfs send I wouldn’t have to worry :slight_smile:

Do I have to stop the server to do rsync for data?

I thought I read somewhere that rsync makes a list of files before it sends them, then sends the files and if new files are added it will not send until next rsync. So i thought that’s fine.

But what happens if a file is changed right after it gets on the list and during the sending hmm it will still send it, you’re right, and seafile files are not many but large libraries in block files : But maybe it will send some changes now and other changes to the file on next rsync.

So without ZFS, stop the server and sync?

Yeah it’s 40GB now, at 100mbps, 1 hour for the first rsync.

Seafile stores file contents in blocks, these blocks are never modified, only deleted or added, except for when the garbage collector is not running, in this case blocks will only be added, not deleted or modified. These blocks comprise the bulk of the storage used by the server, so you can sync the directory where these blocks are stored (I don’t recall the path at the moment), and then take the server down for a moment to backup the databases, the library indexes and seahub related stuff.

For more info on this, I suggest you read the data model page on the manual.

Related post:

1 Like