태그 보관물: backup

backup

홈 디렉토리의 백업에서 제외 할 수있는 파일 및 디렉토리는 무엇입니까? 훌륭하게 수행하고

Duplicity 는 이미 효율적인 백업 작업을 훌륭하게 수행하고 있지만 여전히 백업되는 파일의 양을 최소화하고 싶습니다.

홈 디렉토리에서 제외 할 수있는 파일 또는 디렉토리는 무엇입니까? 와일드 카드를 허용하고 경로는 홈 디렉토리를 기준으로 명시 적으로 지정하십시오.



답변

이러한 파일과 디렉토리는 대부분 누락 된 경우 다시 작성됩니다. 주로 응용 프로그램 (Firefox 확장 캐시)의 시작 시간을 낮추 .gksu.lock거나 잠금 ( )을 표시 하거나 세션 별 정보 (예 : dbus 세션의 ID)를 포함하기위한 것입니다. 최근 문서는 자주 변경되며 일반적으로 백업하기에 적합하지 않습니다.

이 디렉토리는 제외 될 수 있습니다.

.gvfs                           # contains mounted file systems?
.local/share/gvfs-metadata
.Private                        # contains the actual encrypted home directory
.dbus                           # session-specific
.cache
.Trash                          # do I need to say more?
.local/share/Trash
.cddb                           # cached info about audio CDs
.aptitude                       # cached packages lists

플래시 전용 :

.adobe        # Cache for flash, maybe others?
.macromedia   # except for Flash persistence, there is no reason to keep this

파일 :

.xsession-errors            # contains errors from the current graphical session
.recently-used              # recently used files
.recently-used.xbel
.thumbnails
.Xauthority                 # session-specific
.ICEauthority
.gksu.lock
.pulse                      # directory
.pulse-cookie
.esd_auth

KDE 특정 :

.kde/share/apps/RecentDocuments # Recent documents on KDE
.kde/share/apps/klipper         # Contains a history of the Klipper clipboard (KDE)
.kde/share/apps/okular/docdata  # you will loose saved scrolling positions of PDFs
.kde/share/apps/gwenview/recentfolders
.kde/share/apps/kmess/displaypics  # cached other users' profile pics
.kde/share/apps/kmess/customemoticons  # cached emoticons of others

Firefox 특정 ( 프로필 폴더 참조 ) :

.mozilla/firefox/*/Cache
.mozilla/firefox/*/minidumps    # in case Fx crashes dumps will be stored in this
.mozilla/firefox/*/.parentlock       # session-specific
.mozilla/firefox/*/urlclassifier3.sqlite  # phishing database, recreated
.mozilla/firefox/*/blocklist.xml   # blacklisted extensions
.mozilla/firefox/*/extensions.sqlite  # extension database, recreated on startup
.mozilla/firefox/*/extensions.sqlite-journal
.mozilla/firefox/*/extensions.rdf
.mozilla/firefox/*/extensions.ini
.mozilla/firefox/*/extensions.cache
.mozilla/firefox/*/XUL.mfasl     # cached UI data, recreated
.mozilla/firefox/*/XPC.mfasl
.mozilla/firefox/*/xpti.dat
.mozilla/firefox/*/compreg.dat

Opera 관련 (Superuser.com 관련 질문 : Opera 프로필 폴더의 파일 및 디렉토리에 대한 설명서가 있습니까? ) :

.opera/temporary_downloads
.opera/cache
.opera/thumbnails
.opera/opcache
.opera/icons
.opera/application_cache
.opera/widgets/*/cache
.opera/lock

코모도 편집 :

.komodoedit/*/codeintel/db
.komodoedit/*/host-*/*/codeintel
.komodoedit/*/XRE/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/Crash Reports
.komodoedit/*/XRE/.activatestate/komodo edit/*/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/*/minidump
.komodoedit/*/XRE/.parentlock
.komodoedit/*/XRE/extensions.rdf
.komodoedit/*/XRE/extensions.ini
.komodoedit/*/XRE/extensions.cache
.komodoedit/*/XRE/XPC.mfasl
.komodoedit/*/XRE/XUL.mfasl
.komodoedit/*/XRE/xpti.dat
.komodoedit/*/XRE/pluginreg.dat
.komodoedit/*/XRE/compreg.dat
.komodoedit/*/XRE/*.sqlite-journal
.komodoedit/*/pystdout.log
.komodoedit/*/pystderr.log
.komodoedit/*/history.sqlite.bak
.komodoedit/*/running.lock
.komodoedit/*/mutex.lock
.komodoedit/*/*.xmlc
.komodoedit/*/startup-env.tmp
.komoeoedit/*/commandments.fifo
.komoeoedit/*/history.sqlite

GnuPG :

.gnupg/rnd
.gnupg/random_seed
.gnupg/.#*
.gnupg/*.lock
.gnupg/gpg-agent-info-*

구글 크롬:

.config/google-chrome/Default/Local Storage
.config/google-chrome/Default/Session Storage
.config/google-chrome/Default/Application Cache
.config/google-chrome/Default/History Index *

다른 앱들 :

.pulse/icons                  # Pidgin
.java/deployment/cache        # Cached applets
.icedteaplugin
.icedtea
.gnome2/epiphany/favicon_cache
.dropbox                      # to avoid problems, let Dropbox re-create these
.dropbox-dist


답변

좋은 질문. 커뮤니티 추천 / 목록을 수집하고 관련 항목을 선택하는 것이 좋습니다. 여기 내 .exclude파일이 있습니다. 나는이 파일을 공급 rsync를 int로서 --exclude-file=(당신은 또한 함께 할 수있는 여러 스크립트에서 파라미터 이중성 ). 이 질문은 “무엇을 저장하고 싶은가 / 저장해야 함”을 의미합니다. 예를 들어, .mozilla여러 개의 프로파일과 조정이 포함되어있는 전체 DIR을 백업하고 디스크 전체에 다시 덤프하는 것이 더 쉽습니다. 또한 내 구성에 암시 : 테스트를 위해 많은 “빌드 업 설치”를 수행합니다. 따라서 잘 알려진 기본 설치 의 clonezilla 이미지가 있으며 디스크에 저장된 후 USB에 저장된 개인 (/ 홈) 데이터를 추가합니다. 때로는 선택적으로, 때로는 전체적으로.

# Filename: admin/dotfiles/exclude
# Create Date: 20110307-23:36HRS
# ln -s admin/dotfiles/exclude ~/.exclude

.cache
.adobe
.aptitude
.compiz # no settings here; processes
.dbus
.dropbox # don't try to restore and reinitialize either of
.dropbox-dist # these DIRs; very messy results can happen
.elegant-gnome-backup
.fontconfig
.gnome2_private # MT; at least on my system
.pulse*
.gconfd
.gvfs
.macromedia
.local/share/Trash/
.thumbnails
Downloads/
Dropbox/ # recreated on re-initialization
Public/
Music/
Templates/ # stored on U1
Ubuntu One/ # recreated on re-initialization
wdir/iso/
wdir/backups/


답변

https://github.com/rubo77/rsync-homedir-excludes 에서 무시 목록을 만들었습니다.

Duplicity 또는 rsync와 같이 사용할 수 있습니다.

rsync -aP --exclude-from=rsync-homedir-excludes.txt /home/$USER/ /media/$USER/linuxbackup/home/$USER/

이것은 지금까지 우리가 가지고있는 순간에 정기적으로 업데이트됩니다.

################################################
# These directories may definitely be excluded #
################################################

# Contains mounted file systems:

.gvfs
.local/share/gvfs-metadata
# contains the actual encrypted home directory
/.Private

# Session-specific:
/.dbus
/.cache
/.Trash
.Trash-1*
.local/share/Trash
/Trash

# Cached info about audio CDs:
.cddb

# Cached packages lists:
.aptitude

# Node Package Manager cache
.npm

#Flash-specific:

# Cache for flash, maybe others?
.adobe
# except for Flash persistence, there is no reason to keep this
.macromedia

#Files:

# Contains errors from the current graphical session
.xsession-errors
.wayland-errors

# Recently used files
.local/share/RecentDocuments
.recently-used
.recently-used.xbel
.thumbnails
.thumb
Thumbs.db
.DS_Store
.localised
.bash_history
.CFUserTextEncoding

# Common Unix Printing System
/.cups

# run-time configuration information for Subversion
/.subversion

# Python virtual environments
/.virtualenvs

# Session-specific
.Xauthority
.ICEauthority
.gksu.lock
.pulse
.pulse-cookie
.esd_auth

#KDE specific:

# Recent documents on KDE
.kde/share/apps/RecentDocuments
.kde4/share/apps/RecentDocuments
# Contains a history of the Klipper clipboard (KDE)
.kde/share/apps/klipper
.kde4/share/apps/klipper
# You will loose saved scrolling positions of PDFs
.kde/share/apps/okular/docdata
.kde/share/apps/gwenview/recentfolders
.kde4/share/apps/okular/docdata
.kde4/share/apps/gwenview/recentfolders
# Cached other users' profile pics
.kde/share/apps/kmess/displaypics
.kde4/share/apps/kmess/displaypics
# Cached emoticons of others
.kde/share/apps/kmess/customemoticons
.kde4/share/apps/kmess/customemoticons

#Firefox-specific (see also Profile folder):

.mozilla/firefox/*/Cache
# in case Fx crashes dumps will be stored in this
.mozilla/firefox/*/minidumps
# session-specific
.mozilla/firefox/*/.parentlock
# phishing database, recreated
.mozilla/firefox/*/urlclassifier3.sqlite
# blacklisted extensions
.mozilla/firefox/*/blocklist.xml
# extension database, recreated on startup
.mozilla/firefox/*/extensions.sqlite
.mozilla/firefox/*/extensions.sqlite-journal
.mozilla/firefox/*/extensions.rdf
.mozilla/firefox/*/extensions.ini
.mozilla/firefox/*/extensions.cache
# cached UI data, recreated
.mozilla/firefox/*/XUL.mfasl
.mozilla/firefox/*/XPC.mfasl
.mozilla/firefox/*/xpti.dat
.mozilla/firefox/*/compreg.dat
# cached plugin data, recreated
.mozilla/firefox/*/pluginreg.dat

#SeaMonkey-specific (see also Profile folder):

.mozilla/seamonkey/*/Cache
# in case Fx crashes dumps will be stored in this
.mozilla/seamonkey/*/minidumps
# session-specific
.mozilla/seamonkey/*/.parentlock
# blacklisted extensions
.mozilla/seamonkey/*/blocklist.xml
# extension database, recreated on startup
.mozilla/seamonkey/*/extensions.sqlite
.mozilla/seamonkey/*/extensions.rdf
.mozilla/seamonkey/*/extensions.ini
# cached UI data, recreated
.mozilla/seamonkey/*/xpti.dat
.mozilla/seamonkey/*/compreg.dat
# cached plugin data, recreated
.mozilla/seamonkey/*/pluginreg.dat

# Thunderbird Cache in your profile folder
.thunderbird/*/Cache

#Opera-specific (related question on Superuser.com: Is documentation available on files and directories in the Opera profile folder?):

.opera/temporary_downloads
.opera/cache
.opera/thumbnails
.opera/opcache
.opera/icons
.opera/application_cache
.opera/widgets/*/cache
.opera/lock

# Keychain dir (manage SSH and GPG keys, front-end to ssh-agent and ssh-add)
/.keychain

#Komodo Edit:

.komodoedit/*/codeintel/db
.komodoedit/*/host-*/*/codeintel
.komodoedit/*/XRE/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/Crash Reports
.komodoedit/*/XRE/.activatestate/komodo edit/*/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/*/minidump
.komodoedit/*/XRE/.parentlock
.komodoedit/*/XRE/extensions.rdf
.komodoedit/*/XRE/extensions.ini
.komodoedit/*/XRE/extensions.cache
.komodoedit/*/XRE/XPC.mfasl
.komodoedit/*/XRE/XUL.mfasl
.komodoedit/*/XRE/xpti.dat
.komodoedit/*/XRE/pluginreg.dat
.komodoedit/*/XRE/compreg.dat
.komodoedit/*/XRE/*.sqlite-journal
.komodoedit/*/pystdout.log
.komodoedit/*/pystderr.log
.komodoedit/*/history.sqlite.bak
.komodoedit/*/running.lock
.komodoedit/*/mutex.lock
.komodoedit/*/*.xmlc
.komodoedit/*/startup-env.tmp
.komoeoedit/*/commandments.fifo
.komoeoedit/*/history.sqlite

#GnuPG:

.gnupg/rnd
.gnupg/random_seed
.gnupg/.#*
.gnupg/*.lock
.gnupg/gpg-agent-info-*

#Google Chrome:

.config/google-chrome/Default/Local Storage
.config/google-chrome/Default/Session Storage
.config/google-chrome/Default/Application Cache
.config/google-chrome/Default/History Index *

#Chromium:

.config/chromium/Default/Local Storage
.config/chromium/Default/Session Storage
.config/chromium/Default/Application Cache
.config/chromium/Default/History Index *

#Local repositories (added by errantlinguist on 2015-04-13):
.gradle/caches
/.m2/repository

#indexer
.local/share/baloo
.local/share/zeitgeist
.local/share/akonadi

#Other apps:

# Pidgin
.pulse/icons
# Cached applets
.guayadeque/cache.db
.java/deployment/cache
.icedteaplugin
.icedtea
.gnome2/epiphany/favicon_cache

# other temporary files
nohup.out

###############################################
# directories, probably not worth a backup    #
# (uncomment the files you don't need)        #
###############################################

#.android
#.AndroidStudio*/
#Android/Sdk
#.gradle
#.gvm
#.grails/
#.grails_history
#.kde/share/apps/nepomuk
#.local/share/notbit
#.local/libvirt
#.vagrant
#.vagrant.d
#.wine
#.twister
#/twister
#Applications/eclipse*
#/Downloads
#*Popcorntime*
#/Scribus
#/VirtualBox*
#
## Add Game Folders here:
#
#/games
#.local/share/Steam
#.steam
#Steam
#.minecraft
#.PlayOnLinux


답변

최근에 이런 종류의 일을보고 있었는데 백업하고 싶지 않은 홈 디렉토리의 많은 파일에 그룹 권한이 설정되어 있지 않은 것으로 나타났습니다. 다른 시스템에서도 동일하게 유지되는 경우 다음을 사용하여 용의자 목록을 얻을 수 있습니다.

find ~ -not -perm -g+r

(출력은 확인했지만 내 이메일은 대부분 좋아 보였지만 전자 메일받은 편지함도 목록에 표시되어 다른 사람에게 얼마나 잘 작동하는지 모르겠습니다.)

홈 디렉토리가 파일 이름을 포함하여 암호화되어 있기 때문에 수동으로 제외 목록이 PITA가 될 것이므로 그룹 권한을 사용하여 제외 목록을 자동 생성 할 수 있어야합니다.

(나는 스레드가 오래되었다는 것을 알고 있지만 이것이 누군가에게 유용 할 것이라고 생각했습니다.)


답변