mirror of
https://github.com/haiwen/seafile-admin-docs.git
synced 2025-12-26 02:32:50 +00:00
Merge pull request #607 from haiwen/fix_data_restore
Some checks are pending
Deploy CI - 12.0 / deploy (push) Waiting to run
Some checks are pending
Deploy CI - 12.0 / deploy (push) Waiting to run
Fix: Data Backup and Restore
This commit is contained in:
commit
032fd9020e
|
|
@ -195,5 +195,20 @@ docker exec -it seafile-mysql /bin/sh -c "mariadb -u[username] -p[password] seah
|
|||
### Restore the seafile data
|
||||
|
||||
```bash
|
||||
cp -R /backup/data/* /opt/seafile-data/seafile/
|
||||
# Recommended: use rsync to restore, preserving ownership/permissions/ACL/xattrs.
|
||||
# Run a dry-run first to review the changes.
|
||||
# Dry-run (no changes made)
|
||||
sudo rsync -aHAX --dry-run --itemize-changes /backup/data/seafile/ /opt/seafile-data/seafile/
|
||||
|
||||
# Restore (apply changes)
|
||||
sudo rsync -aHAX /backup/data/seafile/ /opt/seafile-data/seafile/
|
||||
|
||||
# Optional: make the target an exact mirror of the backup
|
||||
# (will delete files present in the target but not in the backup;
|
||||
# add only after reviewing the dry-run output)
|
||||
# sudo rsync -aHAX --delete /backup/data/seafile/ /opt/seafile-data/seafile/
|
||||
```
|
||||
!!! note
|
||||
Trailing “/” on the source means “copy the directory CONTENTS”.
|
||||
|
||||
Run with sudo to preserve owners, groups, ACLs (-A) and xattrs (-X).
|
||||
|
|
|
|||
Loading…
Reference in New Issue