The archive command exports photos and videos from various sources to a local folder structure organized by date. The destination folder isn't wiped out before the operation, so it's possible to add new photos to an existing archive.
immich-go archive <sub-command> --write-to-folder=<destination> [options] <source>Photos are organized chronologically:
destination-folder/
├── 2022/
│ ├── 2022-01/
│ │ ├── photo01.jpg
│ │ └── photo01.jpg.JSON # Metadata file
│ └── 2022-02/
│ ├── photo02.jpg
│ └── photo02.jpg.JSON
├── 2023/
│ ├── 2023-03/
│ └── 2023-04/
└── 2024/
├── 2024-05/
└── 2024-06/
| Option | Description |
|---|---|
--write-to-folder |
Destination folder for archived photos |
All upload sub-commands are available for archive:
| Sub-command | Source | Description |
|---|---|---|
from-folder |
Local filesystem | Archive from local folders or ZIP archives |
from-google-photos |
Google Takeout | Archive from Google Photos takeout |
from-icloud |
iCloud export | Archive from iCloud takeout |
from-picasa |
Picasa | Archive from Picasa collections |
from-immich |
Immich server | Archive from Immich server |
Each photo gets a corresponding .JSON file containing:
- Original filename and capture date
- GPS coordinates (latitude/longitude)
- Album associations
- Tags and descriptions
- Rating and favorite status
- Archive/trash status
{
"fileName": "example.jpg",
"latitude": 37.7749,
"longitude": -122.4194,
"dateTaken": "2023-10-01T12:34:56Z",
"description": "Golden Gate Bridge view",
"albums": [
{
"title": "San Francisco Trip",
"description": "Photos from my trip"
}
],
"tags": [
{ "value": "USA/California/San Francisco" }
],
"rating": 5,
"trashed": false,
"archived": false,
"favorited": true,
"fromPartner": false
}# Archive all photos from server
immich-go archive from-immich \
--from-server=http://localhost:2283 \
--from-api-key=your-key \
--write-to-folder=/backup/photos
# Archive specific date range
immich-go archive from-immich \
--from-server=http://localhost:2283 \
--from-api-key=your-key \
--from-date-range=2023 \
--write-to-folder=/backup/2023-photos
# Archive specific album
immich-go archive from-immich \
--from-server=http://localhost:2283 \
--from-api-key=your-key \
--from-albums="Family" \
--write-to-folder=/backup/albums# Create organized archive from takeout
immich-go archive from-google-photos \
--write-to-folder=/organized-photos \
/path/to/takeout-*.zip
# Archive a specific album
immich-go archive from-google-photos \
--from-album-name="Summer Vacation" \
--write-to-folder=/vacations \
/path/to/takeout# Reorganize existing photos by date
immich-go archive from-folder \
--write-to-folder=/organized \
/messy/photo/folders
Create a complete backup of your Immich server:
immich-go archive from-immich \
--from-server=http://localhost:2283 \
--from-api-key=your-key \
--write-to-folder=/complete-backupPrepare photos for migration to another system:
immich-go archive from-immich \
--from-server=http://localhost:2283 \
--from-api-key=your-key \
--write-to-folder=/migration-readyTransform messy folder structures into organized archives:
immich-go archive from-folder \
--write-to-folder=/organized \
/chaotic/photo/collectionArchive specific content based on criteria:
# Archive by year
immich-go archive from-immich \
--from-date-range=2022-01-01,2022-12-31 \
--write-to-folder=/archive-2022 \
--from-server=http://localhost:2283 \
--from-api-key=your-key \
# Archive by album
immich-go archive from-immich \
--from-albums="Professional Photos" \
--write-to-folder=/work-archive \
--from-server=http://localhost:2283 \
--from-api-key=your-key \- Incremental: Archives can be updated - new photos are added without affecting existing ones
- Metadata Preservation: JSON files ensure no metadata is lost
- Cross-Platform: Archived photos can be imported to any compatible system
- Space Efficient: No unnecessary duplication during incremental updates
Same as upload command.
Same filtering options as corresponding upload sub-commands:
- File type filtering (
--include-type,--include-extensions) - Date range filtering (
--date-range,--from-date-range) - Album filtering (
--from-albums)
- Upload Command - For option details
- Technical Details - Metadata formats
- Examples - More use cases